var aw=Object.defineProperty;var cp=n=>{throw TypeError(n)};var lw=(n,t,s)=>t in n?aw(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s;var Le=(n,t,s)=>lw(n,typeof t!="symbol"?t+"":t,s),Uu=(n,t,s)=>t.has(n)||cp("Cannot "+s);var R=(n,t,s)=>(Uu(n,t,"read from private field"),s?s.call(n):t.get(n)),pe=(n,t,s)=>t.has(n)?cp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,s),ee=(n,t,s,i)=>(Uu(n,t,"write to private field"),i?i.call(n,s):t.set(n,s),s),Ne=(n,t,s)=>(Uu(n,t,"access private method"),s);var pa=(n,t,s,i)=>({set _(a){ee(n,t,a,s)},get _(){return R(n,t,i)}});function uw(n,t){for(var s=0;si[a]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function s(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(a){if(a.ep)return;a.ep=!0;const u=s(a);fetch(a.href,u)}})();function Vc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Bu={exports:{}},Oi={},$u={exports:{}},Ce={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var dp;function cw(){if(dp)return Ce;dp=1;var n=Symbol.for("react.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),w=Symbol.iterator;function E(N){return N===null||typeof N!="object"?null:(N=w&&N[w]||N["@@iterator"],typeof N=="function"?N:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,k={};function x(N,U,ce){this.props=N,this.context=U,this.refs=k,this.updater=ce||A}x.prototype.isReactComponent={},x.prototype.setState=function(N,U){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,U,"setState")},x.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function S(){}S.prototype=x.prototype;function L(N,U,ce){this.props=N,this.context=U,this.refs=k,this.updater=ce||A}var O=L.prototype=new S;O.constructor=L,D(O,x.prototype),O.isPureReactComponent=!0;var j=Array.isArray,V=Object.prototype.hasOwnProperty,$={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function B(N,U,ce){var me,he={},Y=null,ve=null;if(U!=null)for(me in U.ref!==void 0&&(ve=U.ref),U.key!==void 0&&(Y=""+U.key),U)V.call(U,me)&&!G.hasOwnProperty(me)&&(he[me]=U[me]);var Re=arguments.length-2;if(Re===1)he.children=ce;else if(1>>1,U=K[N];if(0>>1;Na(he,F))Ya(ve,he)?(K[N]=ve,K[Y]=F,N=Y):(K[N]=he,K[me]=F,N=me);else if(Ya(ve,F))K[N]=ve,K[Y]=F,N=Y;else break e}}return ae}function a(K,ae){var F=K.sortIndex-ae.sortIndex;return F!==0?F:K.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,h=d.now();n.unstable_now=function(){return d.now()-h}}var m=[],g=[],v=1,w=null,E=3,A=!1,D=!1,k=!1,x=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(K){for(var ae=s(g);ae!==null;){if(ae.callback===null)i(g);else if(ae.startTime<=K)i(g),ae.sortIndex=ae.expirationTime,t(m,ae);else break;ae=s(g)}}function j(K){if(k=!1,O(K),!D)if(s(m)!==null)D=!0,Se(V);else{var ae=s(g);ae!==null&&Ee(j,ae.startTime-K)}}function V(K,ae){D=!1,k&&(k=!1,S(B),B=-1),A=!0;var F=E;try{for(O(ae),w=s(m);w!==null&&(!(w.expirationTime>ae)||K&&!be());){var N=w.callback;if(typeof N=="function"){w.callback=null,E=w.priorityLevel;var U=N(w.expirationTime<=ae);ae=n.unstable_now(),typeof U=="function"?w.callback=U:w===s(m)&&i(m),O(ae)}else i(m);w=s(m)}if(w!==null)var ce=!0;else{var me=s(g);me!==null&&Ee(j,me.startTime-ae),ce=!1}return ce}finally{w=null,E=F,A=!1}}var $=!1,G=null,B=-1,oe=5,ue=-1;function be(){return!(n.unstable_now()-ueK||125N?(K.sortIndex=F,t(g,K),s(m)===null&&K===s(g)&&(k?(S(B),B=-1):k=!0,Ee(j,F-N))):(K.sortIndex=U,t(m,K),D||A||(D=!0,Se(V))),K},n.unstable_shouldYield=be,n.unstable_wrapCallback=function(K){var ae=E;return function(){var F=E;E=ae;try{return K.apply(this,arguments)}finally{E=F}}}})(Wu)),Wu}var gp;function pw(){return gp||(gp=1,Hu.exports=hw()),Hu.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var yp;function mw(){if(yp)return Nt;yp=1;var n=Hc(),t=pw();function s(e){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),m=Object.prototype.hasOwnProperty,g=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v={},w={};function E(e){return m.call(w,e)?!0:m.call(v,e)?!1:g.test(e)?w[e]=!0:(v[e]=!0,!1)}function A(e,r,o,l){if(o!==null&&o.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return l?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function D(e,r,o,l){if(r===null||typeof r>"u"||A(e,r,o,l))return!0;if(l)return!1;if(o!==null)switch(o.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function k(e,r,o,l,c,f,y){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=l,this.attributeNamespace=c,this.mustUseProperty=o,this.propertyName=e,this.type=r,this.sanitizeURL=f,this.removeEmptyString=y}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){x[e]=new k(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var r=e[0];x[r]=new k(r,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){x[e]=new k(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){x[e]=new k(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){x[e]=new k(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){x[e]=new k(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){x[e]=new k(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){x[e]=new k(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){x[e]=new k(e,5,!1,e.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function L(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var r=e.replace(S,L);x[r]=new k(r,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var r=e.replace(S,L);x[r]=new k(r,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var r=e.replace(S,L);x[r]=new k(r,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){x[e]=new k(e,1,!1,e.toLowerCase(),null,!1,!1)}),x.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){x[e]=new k(e,1,!1,e.toLowerCase(),null,!0,!0)});function O(e,r,o,l){var c=x.hasOwnProperty(r)?x[r]:null;(c!==null?c.type!==0:l||!(2b||c[y]!==f[b]){var C=` `+c[y].replace(" at new "," at ");return e.displayName&&C.includes("")&&(C=C.replace("",e.displayName)),C}while(1<=y&&0<=b);break}}}finally{ce=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?U(e):""}function he(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return e=me(e.type,!1),e;case 11:return e=me(e.type.render,!1),e;case 1:return e=me(e.type,!0),e;default:return""}}function Y(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case $:return"Portal";case oe:return"Profiler";case B:return"StrictMode";case xe:return"Suspense";case J:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case be:return(e.displayName||"Context")+".Consumer";case ue:return(e._context.displayName||"Context")+".Provider";case Te:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _e:return r=e.displayName||null,r!==null?r:Y(e.type)||"Memo";case Se:r=e._payload,e=e._init;try{return Y(e(r))}catch{}}return null}function ve(e){var r=e.type;switch(e.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=r.render,e=e.displayName||e.name||"",r.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Y(r);case 8:return r===B?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function Re(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ye(e){var r=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function tt(e){var r=ye(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,r),l=""+e[r];if(!e.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var c=o.get,f=o.set;return Object.defineProperty(e,r,{configurable:!0,get:function(){return c.call(this)},set:function(y){l=""+y,f.call(this,y)}}),Object.defineProperty(e,r,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){e._valueTracker=null,delete e[r]}}}}function Ft(e){e._valueTracker||(e._valueTracker=tt(e))}function ot(e){if(!e)return!1;var r=e._valueTracker;if(!r)return!0;var o=r.getValue(),l="";return e&&(l=ye(e)?e.checked?"true":"false":e.value),e=l,e!==o?(r.setValue(e),!0):!1}function Xt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ut(e,r){var o=r.checked;return F({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function Bt(e,r){var o=r.defaultValue==null?"":r.defaultValue,l=r.checked!=null?r.checked:r.defaultChecked;o=Re(r.value!=null?r.value:o),e._wrapperState={initialChecked:l,initialValue:o,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function we(e,r){r=r.checked,r!=null&&O(e,"checked",r,!1)}function at(e,r){we(e,r);var o=Re(r.value),l=r.type;if(o!=null)l==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}r.hasOwnProperty("value")?Zt(e,r.type,o):r.hasOwnProperty("defaultValue")&&Zt(e,r.type,Re(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(e.defaultChecked=!!r.defaultChecked)}function Jt(e,r,o){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var l=r.type;if(!(l!=="submit"&&l!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+e._wrapperState.initialValue,o||r===e.value||(e.value=r),e.defaultValue=r}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function Zt(e,r,o){(r!=="number"||Xt(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var Mn=Array.isArray;function Fn(e,r,o,l){if(e=e.options,r){r={};for(var c=0;c"+r.valueOf().toString()+"",r=io.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;r.firstChild;)e.appendChild(r.firstChild)}});function Qs(e,r){if(r){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=r;return}}e.textContent=r}var Ks={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},dv=["Webkit","ms","Moz","O"];Object.keys(Ks).forEach(function(e){dv.forEach(function(r){r=r+e.charAt(0).toUpperCase()+e.substring(1),Ks[r]=Ks[e]})});function Ed(e,r,o){return r==null||typeof r=="boolean"||r===""?"":o||typeof r!="number"||r===0||Ks.hasOwnProperty(e)&&Ks[e]?(""+r).trim():r+"px"}function kd(e,r){e=e.style;for(var o in r)if(r.hasOwnProperty(o)){var l=o.indexOf("--")===0,c=Ed(o,r[o],l);o==="float"&&(o="cssFloat"),l?e.setProperty(o,c):e[o]=c}}var fv=F({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ja(e,r){if(r){if(fv[e]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(s(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(s(61))}if(r.style!=null&&typeof r.style!="object")throw Error(s(62))}}function Za(e,r){if(e.indexOf("-")===-1)return typeof r.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var el=null;function tl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nl=null,rs=null,ss=null;function Cd(e){if(e=gi(e)){if(typeof nl!="function")throw Error(s(280));var r=e.stateNode;r&&(r=No(r),nl(e.stateNode,e.type,r))}}function Rd(e){rs?ss?ss.push(e):ss=[e]:rs=e}function Td(){if(rs){var e=rs,r=ss;if(ss=rs=null,Cd(e),r)for(e=0;e>>=0,e===0?32:31-(_v(e)/Ev|0)|0}var co=64,fo=4194304;function Js(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ho(e,r){var o=e.pendingLanes;if(o===0)return 0;var l=0,c=e.suspendedLanes,f=e.pingedLanes,y=o&268435455;if(y!==0){var b=y&~c;b!==0?l=Js(b):(f&=y,f!==0&&(l=Js(f)))}else y=o&~c,y!==0?l=Js(y):f!==0&&(l=Js(f));if(l===0)return 0;if(r!==0&&r!==l&&(r&c)===0&&(c=l&-l,f=r&-r,c>=f||c===16&&(f&4194240)!==0))return r;if((l&4)!==0&&(l|=o&16),r=e.entangledLanes,r!==0)for(e=e.entanglements,r&=l;0o;o++)r.push(e);return r}function Zs(e,r,o){e.pendingLanes|=r,r!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,r=31-en(r),e[r]=o}function Tv(e,r){var o=e.pendingLanes&~r;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=r,e.mutableReadLanes&=r,e.entangledLanes&=r,r=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0=ai),nf=" ",rf=!1;function sf(e,r){switch(e){case"keyup":return n0.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function of(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var as=!1;function s0(e,r){switch(e){case"compositionend":return of(r);case"keypress":return r.which!==32?null:(rf=!0,nf);case"textInput":return e=r.data,e===nf&&rf?null:e;default:return null}}function i0(e,r){if(as)return e==="compositionend"||!xl&&sf(e,r)?(e=Yd(),vo=pl=Hn=null,as=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1=r)return{node:o,offset:r-e};e=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=hf(o)}}function mf(e,r){return e&&r?e===r?!0:e&&e.nodeType===3?!1:r&&r.nodeType===3?mf(e,r.parentNode):"contains"in e?e.contains(r):e.compareDocumentPosition?!!(e.compareDocumentPosition(r)&16):!1:!1}function gf(){for(var e=window,r=Xt();r instanceof e.HTMLIFrameElement;){try{var o=typeof r.contentWindow.location.href=="string"}catch{o=!1}if(o)e=r.contentWindow;else break;r=Xt(e.document)}return r}function _l(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r&&(r==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||r==="textarea"||e.contentEditable==="true")}function p0(e){var r=gf(),o=e.focusedElem,l=e.selectionRange;if(r!==o&&o&&o.ownerDocument&&mf(o.ownerDocument.documentElement,o)){if(l!==null&&_l(o)){if(r=l.start,e=l.end,e===void 0&&(e=r),"selectionStart"in o)o.selectionStart=r,o.selectionEnd=Math.min(e,o.value.length);else if(e=(r=o.ownerDocument||document)&&r.defaultView||window,e.getSelection){e=e.getSelection();var c=o.textContent.length,f=Math.min(l.start,c);l=l.end===void 0?f:Math.min(l.end,c),!e.extend&&f>l&&(c=l,l=f,f=c),c=pf(o,f);var y=pf(o,l);c&&y&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==y.node||e.focusOffset!==y.offset)&&(r=r.createRange(),r.setStart(c.node,c.offset),e.removeAllRanges(),f>l?(e.addRange(r),e.extend(y.node,y.offset)):(r.setEnd(y.node,y.offset),e.addRange(r)))}}for(r=[],e=o;e=e.parentNode;)e.nodeType===1&&r.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o=document.documentMode,ls=null,El=null,di=null,kl=!1;function yf(e,r,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;kl||ls==null||ls!==Xt(l)||(l=ls,"selectionStart"in l&&_l(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),di&&ci(di,l)||(di=l,l=Co(El,"onSelect"),0hs||(e.current=Dl[hs],Dl[hs]=null,hs--)}function Me(e,r){hs++,Dl[hs]=e.current,e.current=r}var Kn={},ht=Qn(Kn),Et=Qn(!1),Er=Kn;function ps(e,r){var o=e.type.contextTypes;if(!o)return Kn;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===r)return l.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in o)c[f]=r[f];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=c),c}function kt(e){return e=e.childContextTypes,e!=null}function Po(){Ue(Et),Ue(ht)}function Af(e,r,o){if(ht.current!==Kn)throw Error(s(168));Me(ht,r),Me(Et,o)}function jf(e,r,o){var l=e.stateNode;if(r=r.childContextTypes,typeof l.getChildContext!="function")return o;l=l.getChildContext();for(var c in l)if(!(c in r))throw Error(s(108,ve(e)||"Unknown",c));return F({},o,l)}function Oo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kn,Er=ht.current,Me(ht,e),Me(Et,Et.current),!0}function Lf(e,r,o){var l=e.stateNode;if(!l)throw Error(s(169));o?(e=jf(e,r,Er),l.__reactInternalMemoizedMergedChildContext=e,Ue(Et),Ue(ht),Me(ht,e)):Ue(Et),Me(Et,o)}var kn=null,Ao=!1,Ml=!1;function zf(e){kn===null?kn=[e]:kn.push(e)}function C0(e){Ao=!0,zf(e)}function Gn(){if(!Ml&&kn!==null){Ml=!0;var e=0,r=Ie;try{var o=kn;for(Ie=1;e>=y,c-=y,Cn=1<<32-en(r)+c|o<ge?(st=fe,fe=null):st=fe.sibling;var je=H(z,fe,I[ge],Q);if(je===null){fe===null&&(fe=st);break}e&&fe&&je.alternate===null&&r(z,fe),T=f(je,T,ge),de===null?le=je:de.sibling=je,de=je,fe=st}if(ge===I.length)return o(z,fe),Be&&Cr(z,ge),le;if(fe===null){for(;gege?(st=fe,fe=null):st=fe.sibling;var sr=H(z,fe,je.value,Q);if(sr===null){fe===null&&(fe=st);break}e&&fe&&sr.alternate===null&&r(z,fe),T=f(sr,T,ge),de===null?le=sr:de.sibling=sr,de=sr,fe=st}if(je.done)return o(z,fe),Be&&Cr(z,ge),le;if(fe===null){for(;!je.done;ge++,je=I.next())je=q(z,je.value,Q),je!==null&&(T=f(je,T,ge),de===null?le=je:de.sibling=je,de=je);return Be&&Cr(z,ge),le}for(fe=l(z,fe);!je.done;ge++,je=I.next())je=Z(fe,z,ge,je.value,Q),je!==null&&(e&&je.alternate!==null&&fe.delete(je.key===null?ge:je.key),T=f(je,T,ge),de===null?le=je:de.sibling=je,de=je);return e&&fe.forEach(function(ow){return r(z,ow)}),Be&&Cr(z,ge),le}function Qe(z,T,I,Q){if(typeof I=="object"&&I!==null&&I.type===G&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case V:e:{for(var le=I.key,de=T;de!==null;){if(de.key===le){if(le=I.type,le===G){if(de.tag===7){o(z,de.sibling),T=c(de,I.props.children),T.return=z,z=T;break e}}else if(de.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===Se&&Bf(le)===de.type){o(z,de.sibling),T=c(de,I.props),T.ref=yi(z,de,I),T.return=z,z=T;break e}o(z,de);break}else r(z,de);de=de.sibling}I.type===G?(T=Lr(I.props.children,z.mode,Q,I.key),T.return=z,z=T):(Q=oa(I.type,I.key,I.props,null,z.mode,Q),Q.ref=yi(z,T,I),Q.return=z,z=Q)}return y(z);case $:e:{for(de=I.key;T!==null;){if(T.key===de)if(T.tag===4&&T.stateNode.containerInfo===I.containerInfo&&T.stateNode.implementation===I.implementation){o(z,T.sibling),T=c(T,I.children||[]),T.return=z,z=T;break e}else{o(z,T);break}else r(z,T);T=T.sibling}T=zu(I,z.mode,Q),T.return=z,z=T}return y(z);case Se:return de=I._init,Qe(z,T,de(I._payload),Q)}if(Mn(I))return ne(z,T,I,Q);if(ae(I))return ie(z,T,I,Q);Io(z,I)}return typeof I=="string"&&I!==""||typeof I=="number"?(I=""+I,T!==null&&T.tag===6?(o(z,T.sibling),T=c(T,I),T.return=z,z=T):(o(z,T),T=Lu(I,z.mode,Q),T.return=z,z=T),y(z)):o(z,T)}return Qe}var vs=$f(!0),Vf=$f(!1),Do=Qn(null),Mo=null,ws=null,Hl=null;function Wl(){Hl=ws=Mo=null}function ql(e){var r=Do.current;Ue(Do),e._currentValue=r}function Ql(e,r,o){for(;e!==null;){var l=e.alternate;if((e.childLanes&r)!==r?(e.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),e===o)break;e=e.return}}function xs(e,r){Mo=e,Hl=ws=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&r)!==0&&(Ct=!0),e.firstContext=null)}function Ht(e){var r=e._currentValue;if(Hl!==e)if(e={context:e,memoizedValue:r,next:null},ws===null){if(Mo===null)throw Error(s(308));ws=e,Mo.dependencies={lanes:0,firstContext:e}}else ws=ws.next=e;return r}var Rr=null;function Kl(e){Rr===null?Rr=[e]:Rr.push(e)}function Hf(e,r,o,l){var c=r.interleaved;return c===null?(o.next=o,Kl(r)):(o.next=c.next,c.next=o),r.interleaved=o,Tn(e,l)}function Tn(e,r){e.lanes|=r;var o=e.alternate;for(o!==null&&(o.lanes|=r),o=e,e=e.return;e!==null;)e.childLanes|=r,o=e.alternate,o!==null&&(o.childLanes|=r),o=e,e=e.return;return o.tag===3?o.stateNode:null}var Yn=!1;function Gl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Wf(e,r){e=e.updateQueue,r.updateQueue===e&&(r.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Nn(e,r){return{eventTime:e,lane:r,tag:0,payload:null,callback:null,next:null}}function Xn(e,r,o){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ae&2)!==0){var c=l.pending;return c===null?r.next=r:(r.next=c.next,c.next=r),l.pending=r,Tn(e,o)}return c=l.interleaved,c===null?(r.next=r,Kl(l)):(r.next=c.next,c.next=r),l.interleaved=r,Tn(e,o)}function Fo(e,r,o){if(r=r.updateQueue,r!==null&&(r=r.shared,(o&4194240)!==0)){var l=r.lanes;l&=e.pendingLanes,o|=l,r.lanes=o,ul(e,o)}}function qf(e,r){var o=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var c=null,f=null;if(o=o.firstBaseUpdate,o!==null){do{var y={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};f===null?c=f=y:f=f.next=y,o=o.next}while(o!==null);f===null?c=f=r:f=f.next=r}else c=f=r;o={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,effects:l.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=r:e.next=r,o.lastBaseUpdate=r}function Uo(e,r,o,l){var c=e.updateQueue;Yn=!1;var f=c.firstBaseUpdate,y=c.lastBaseUpdate,b=c.shared.pending;if(b!==null){c.shared.pending=null;var C=b,M=C.next;C.next=null,y===null?f=M:y.next=M,y=C;var W=e.alternate;W!==null&&(W=W.updateQueue,b=W.lastBaseUpdate,b!==y&&(b===null?W.firstBaseUpdate=M:b.next=M,W.lastBaseUpdate=C))}if(f!==null){var q=c.baseState;y=0,W=M=C=null,b=f;do{var H=b.lane,Z=b.eventTime;if((l&H)===H){W!==null&&(W=W.next={eventTime:Z,lane:0,tag:b.tag,payload:b.payload,callback:b.callback,next:null});e:{var ne=e,ie=b;switch(H=r,Z=o,ie.tag){case 1:if(ne=ie.payload,typeof ne=="function"){q=ne.call(Z,q,H);break e}q=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=ie.payload,H=typeof ne=="function"?ne.call(Z,q,H):ne,H==null)break e;q=F({},q,H);break e;case 2:Yn=!0}}b.callback!==null&&b.lane!==0&&(e.flags|=64,H=c.effects,H===null?c.effects=[b]:H.push(b))}else Z={eventTime:Z,lane:H,tag:b.tag,payload:b.payload,callback:b.callback,next:null},W===null?(M=W=Z,C=q):W=W.next=Z,y|=H;if(b=b.next,b===null){if(b=c.shared.pending,b===null)break;H=b,b=H.next,H.next=null,c.lastBaseUpdate=H,c.shared.pending=null}}while(!0);if(W===null&&(C=q),c.baseState=C,c.firstBaseUpdate=M,c.lastBaseUpdate=W,r=c.shared.interleaved,r!==null){c=r;do y|=c.lane,c=c.next;while(c!==r)}else f===null&&(c.shared.lanes=0);Pr|=y,e.lanes=y,e.memoizedState=q}}function Qf(e,r,o){if(e=r.effects,r.effects=null,e!==null)for(r=0;ro?o:4,e(!0);var l=eu.transition;eu.transition={};try{e(!1),r()}finally{Ie=o,eu.transition=l}}function fh(){return Wt().memoizedState}function P0(e,r,o){var l=tr(e);if(o={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null},hh(e))ph(r,o);else if(o=Hf(e,r,o,l),o!==null){var c=St();an(o,e,l,c),mh(o,r,l)}}function O0(e,r,o){var l=tr(e),c={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null};if(hh(e))ph(r,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=r.lastRenderedReducer,f!==null))try{var y=r.lastRenderedState,b=f(y,o);if(c.hasEagerState=!0,c.eagerState=b,tn(b,y)){var C=r.interleaved;C===null?(c.next=c,Kl(r)):(c.next=C.next,C.next=c),r.interleaved=c;return}}catch{}finally{}o=Hf(e,r,c,l),o!==null&&(c=St(),an(o,e,l,c),mh(o,r,l))}}function hh(e){var r=e.alternate;return e===Ve||r!==null&&r===Ve}function ph(e,r){bi=Vo=!0;var o=e.pending;o===null?r.next=r:(r.next=o.next,o.next=r),e.pending=r}function mh(e,r,o){if((o&4194240)!==0){var l=r.lanes;l&=e.pendingLanes,o|=l,r.lanes=o,ul(e,o)}}var qo={readContext:Ht,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useInsertionEffect:pt,useLayoutEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useMutableSource:pt,useSyncExternalStore:pt,useId:pt,unstable_isNewReconciler:!1},A0={readContext:Ht,useCallback:function(e,r){return mn().memoizedState=[e,r===void 0?null:r],e},useContext:Ht,useEffect:sh,useImperativeHandle:function(e,r,o){return o=o!=null?o.concat([e]):null,Ho(4194308,4,ah.bind(null,r,e),o)},useLayoutEffect:function(e,r){return Ho(4194308,4,e,r)},useInsertionEffect:function(e,r){return Ho(4,2,e,r)},useMemo:function(e,r){var o=mn();return r=r===void 0?null:r,e=e(),o.memoizedState=[e,r],e},useReducer:function(e,r,o){var l=mn();return r=o!==void 0?o(r):r,l.memoizedState=l.baseState=r,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},l.queue=e,e=e.dispatch=P0.bind(null,Ve,e),[l.memoizedState,e]},useRef:function(e){var r=mn();return e={current:e},r.memoizedState=e},useState:nh,useDebugValue:au,useDeferredValue:function(e){return mn().memoizedState=e},useTransition:function(){var e=nh(!1),r=e[0];return e=N0.bind(null,e[1]),mn().memoizedState=e,[r,e]},useMutableSource:function(){},useSyncExternalStore:function(e,r,o){var l=Ve,c=mn();if(Be){if(o===void 0)throw Error(s(407));o=o()}else{if(o=r(),rt===null)throw Error(s(349));(Nr&30)!==0||Xf(l,r,o)}c.memoizedState=o;var f={value:o,getSnapshot:r};return c.queue=f,sh(Zf.bind(null,l,f,e),[e]),l.flags|=2048,Ei(9,Jf.bind(null,l,f,o,r),void 0,null),o},useId:function(){var e=mn(),r=rt.identifierPrefix;if(Be){var o=Rn,l=Cn;o=(l&~(1<<32-en(l)-1)).toString(32)+o,r=":"+r+"R"+o,o=Si++,0<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=y.createElement(o,{is:l.is}):(e=y.createElement(o),o==="select"&&(y=e,l.multiple?y.multiple=!0:l.size&&(y.size=l.size))):e=y.createElementNS(e,o),e[hn]=r,e[mi]=l,zh(e,r,!1,!1),r.stateNode=e;e:{switch(y=Za(o,l),o){case"dialog":Fe("cancel",e),Fe("close",e),c=l;break;case"iframe":case"object":case"embed":Fe("load",e),c=l;break;case"video":case"audio":for(c=0;cks&&(r.flags|=128,l=!0,ki(f,!1),r.lanes=4194304)}else{if(!l)if(e=Bo(y),e!==null){if(r.flags|=128,l=!0,o=e.updateQueue,o!==null&&(r.updateQueue=o,r.flags|=4),ki(f,!0),f.tail===null&&f.tailMode==="hidden"&&!y.alternate&&!Be)return mt(r),null}else 2*qe()-f.renderingStartTime>ks&&o!==1073741824&&(r.flags|=128,l=!0,ki(f,!1),r.lanes=4194304);f.isBackwards?(y.sibling=r.child,r.child=y):(o=f.last,o!==null?o.sibling=y:r.child=y,f.last=y)}return f.tail!==null?(r=f.tail,f.rendering=r,f.tail=r.sibling,f.renderingStartTime=qe(),r.sibling=null,o=$e.current,Me($e,l?o&1|2:o&1),r):(mt(r),null);case 22:case 23:return Ou(),l=r.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(r.flags|=8192),l&&(r.mode&1)!==0?(Dt&1073741824)!==0&&(mt(r),r.subtreeFlags&6&&(r.flags|=8192)):mt(r),null;case 24:return null;case 25:return null}throw Error(s(156,r.tag))}function U0(e,r){switch(Ul(r),r.tag){case 1:return kt(r.type)&&Po(),e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 3:return bs(),Ue(Et),Ue(ht),Zl(),e=r.flags,(e&65536)!==0&&(e&128)===0?(r.flags=e&-65537|128,r):null;case 5:return Xl(r),null;case 13:if(Ue($e),e=r.memoizedState,e!==null&&e.dehydrated!==null){if(r.alternate===null)throw Error(s(340));ys()}return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 19:return Ue($e),null;case 4:return bs(),null;case 10:return ql(r.type._context),null;case 22:case 23:return Ou(),null;case 24:return null;default:return null}}var Yo=!1,gt=!1,B0=typeof WeakSet=="function"?WeakSet:Set,te=null;function _s(e,r){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(l){He(e,r,l)}else o.current=null}function wu(e,r,o){try{o()}catch(l){He(e,r,l)}}var Mh=!1;function $0(e,r){if(Ol=go,e=gf(),_l(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{o.nodeType,f.nodeType}catch{o=null;break e}var y=0,b=-1,C=-1,M=0,W=0,q=e,H=null;t:for(;;){for(var Z;q!==o||c!==0&&q.nodeType!==3||(b=y+c),q!==f||l!==0&&q.nodeType!==3||(C=y+l),q.nodeType===3&&(y+=q.nodeValue.length),(Z=q.firstChild)!==null;)H=q,q=Z;for(;;){if(q===e)break t;if(H===o&&++M===c&&(b=y),H===f&&++W===l&&(C=y),(Z=q.nextSibling)!==null)break;q=H,H=q.parentNode}q=Z}o=b===-1||C===-1?null:{start:b,end:C}}else o=null}o=o||{start:0,end:0}}else o=null;for(Al={focusedElem:e,selectionRange:o},go=!1,te=r;te!==null;)if(r=te,e=r.child,(r.subtreeFlags&1028)!==0&&e!==null)e.return=r,te=e;else for(;te!==null;){r=te;try{var ne=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(ne!==null){var ie=ne.memoizedProps,Qe=ne.memoizedState,z=r.stateNode,T=z.getSnapshotBeforeUpdate(r.elementType===r.type?ie:rn(r.type,ie),Qe);z.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var I=r.stateNode.containerInfo;I.nodeType===1?I.textContent="":I.nodeType===9&&I.documentElement&&I.removeChild(I.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Q){He(r,r.return,Q)}if(e=r.sibling,e!==null){e.return=r.return,te=e;break}te=r.return}return ne=Mh,Mh=!1,ne}function Ci(e,r,o){var l=r.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&wu(r,o,f)}c=c.next}while(c!==l)}}function Xo(e,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var l=o.create;o.destroy=l()}o=o.next}while(o!==r)}}function xu(e){var r=e.ref;if(r!==null){var o=e.stateNode;switch(e.tag){case 5:e=o;break;default:e=o}typeof r=="function"?r(e):r.current=e}}function Fh(e){var r=e.alternate;r!==null&&(e.alternate=null,Fh(r)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(r=e.stateNode,r!==null&&(delete r[hn],delete r[mi],delete r[Il],delete r[E0],delete r[k0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Uh(e){return e.tag===5||e.tag===3||e.tag===4}function Bh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Uh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bu(e,r,o){var l=e.tag;if(l===5||l===6)e=e.stateNode,r?o.nodeType===8?o.parentNode.insertBefore(e,r):o.insertBefore(e,r):(o.nodeType===8?(r=o.parentNode,r.insertBefore(e,o)):(r=o,r.appendChild(e)),o=o._reactRootContainer,o!=null||r.onclick!==null||(r.onclick=To));else if(l!==4&&(e=e.child,e!==null))for(bu(e,r,o),e=e.sibling;e!==null;)bu(e,r,o),e=e.sibling}function Su(e,r,o){var l=e.tag;if(l===5||l===6)e=e.stateNode,r?o.insertBefore(e,r):o.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(Su(e,r,o),e=e.sibling;e!==null;)Su(e,r,o),e=e.sibling}var lt=null,sn=!1;function Jn(e,r,o){for(o=o.child;o!==null;)$h(e,r,o),o=o.sibling}function $h(e,r,o){if(fn&&typeof fn.onCommitFiberUnmount=="function")try{fn.onCommitFiberUnmount(uo,o)}catch{}switch(o.tag){case 5:gt||_s(o,r);case 6:var l=lt,c=sn;lt=null,Jn(e,r,o),lt=l,sn=c,lt!==null&&(sn?(e=lt,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):lt.removeChild(o.stateNode));break;case 18:lt!==null&&(sn?(e=lt,o=o.stateNode,e.nodeType===8?zl(e.parentNode,o):e.nodeType===1&&zl(e,o),si(e)):zl(lt,o.stateNode));break;case 4:l=lt,c=sn,lt=o.stateNode.containerInfo,sn=!0,Jn(e,r,o),lt=l,sn=c;break;case 0:case 11:case 14:case 15:if(!gt&&(l=o.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){c=l=l.next;do{var f=c,y=f.destroy;f=f.tag,y!==void 0&&((f&2)!==0||(f&4)!==0)&&wu(o,r,y),c=c.next}while(c!==l)}Jn(e,r,o);break;case 1:if(!gt&&(_s(o,r),l=o.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=o.memoizedProps,l.state=o.memoizedState,l.componentWillUnmount()}catch(b){He(o,r,b)}Jn(e,r,o);break;case 21:Jn(e,r,o);break;case 22:o.mode&1?(gt=(l=gt)||o.memoizedState!==null,Jn(e,r,o),gt=l):Jn(e,r,o);break;default:Jn(e,r,o)}}function Vh(e){var r=e.updateQueue;if(r!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new B0),r.forEach(function(l){var c=X0.bind(null,e,l);o.has(l)||(o.add(l),l.then(c,c))})}}function on(e,r){var o=r.deletions;if(o!==null)for(var l=0;lc&&(c=y),l&=~f}if(l=c,l=qe()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*H0(l/1960))-l,10e?16:e,er===null)var l=!1;else{if(e=er,er=null,na=0,(Ae&6)!==0)throw Error(s(331));var c=Ae;for(Ae|=4,te=e.current;te!==null;){var f=te,y=f.child;if((te.flags&16)!==0){var b=f.deletions;if(b!==null){for(var C=0;Cqe()-ku?Ar(e,0):Eu|=o),Tt(e,r)}function np(e,r){r===0&&((e.mode&1)===0?r=1:(r=fo,fo<<=1,(fo&130023424)===0&&(fo=4194304)));var o=St();e=Tn(e,r),e!==null&&(Zs(e,r,o),Tt(e,o))}function Y0(e){var r=e.memoizedState,o=0;r!==null&&(o=r.retryLane),np(e,o)}function X0(e,r){var o=0;switch(e.tag){case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(o=c.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(s(314))}l!==null&&l.delete(r),np(e,o)}var rp;rp=function(e,r,o){if(e!==null)if(e.memoizedProps!==r.pendingProps||Et.current)Ct=!0;else{if((e.lanes&o)===0&&(r.flags&128)===0)return Ct=!1,M0(e,r,o);Ct=(e.flags&131072)!==0}else Ct=!1,Be&&(r.flags&1048576)!==0&&If(r,Lo,r.index);switch(r.lanes=0,r.tag){case 2:var l=r.type;Go(e,r),e=r.pendingProps;var c=ps(r,ht.current);xs(r,o),c=nu(null,r,l,e,c,o);var f=ru();return r.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,kt(l)?(f=!0,Oo(r)):f=!1,r.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,Gl(r),c.updater=Qo,r.stateNode=c,c._reactInternals=r,uu(r,l,e,o),r=hu(null,r,l,!0,f,o)):(r.tag=0,Be&&f&&Fl(r),bt(null,r,c,o),r=r.child),r;case 16:l=r.elementType;e:{switch(Go(e,r),e=r.pendingProps,c=l._init,l=c(l._payload),r.type=l,c=r.tag=Z0(l),e=rn(l,e),c){case 0:r=fu(null,r,l,e,o);break e;case 1:r=Nh(null,r,l,e,o);break e;case 11:r=Eh(null,r,l,e,o);break e;case 14:r=kh(null,r,l,rn(l.type,e),o);break e}throw Error(s(306,l,""))}return r;case 0:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:rn(l,c),fu(e,r,l,c,o);case 1:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:rn(l,c),Nh(e,r,l,c,o);case 3:e:{if(Ph(r),e===null)throw Error(s(387));l=r.pendingProps,f=r.memoizedState,c=f.element,Wf(e,r),Uo(r,l,null,o);var y=r.memoizedState;if(l=y.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},r.updateQueue.baseState=f,r.memoizedState=f,r.flags&256){c=Ss(Error(s(423)),r),r=Oh(e,r,l,o,c);break e}else if(l!==c){c=Ss(Error(s(424)),r),r=Oh(e,r,l,o,c);break e}else for(It=qn(r.stateNode.containerInfo.firstChild),zt=r,Be=!0,nn=null,o=Vf(r,null,l,o),r.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(ys(),l===c){r=Pn(e,r,o);break e}bt(e,r,l,o)}r=r.child}return r;case 5:return Kf(r),e===null&&$l(r),l=r.type,c=r.pendingProps,f=e!==null?e.memoizedProps:null,y=c.children,jl(l,c)?y=null:f!==null&&jl(l,f)&&(r.flags|=32),Th(e,r),bt(e,r,y,o),r.child;case 6:return e===null&&$l(r),null;case 13:return Ah(e,r,o);case 4:return Yl(r,r.stateNode.containerInfo),l=r.pendingProps,e===null?r.child=vs(r,null,l,o):bt(e,r,l,o),r.child;case 11:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:rn(l,c),Eh(e,r,l,c,o);case 7:return bt(e,r,r.pendingProps,o),r.child;case 8:return bt(e,r,r.pendingProps.children,o),r.child;case 12:return bt(e,r,r.pendingProps.children,o),r.child;case 10:e:{if(l=r.type._context,c=r.pendingProps,f=r.memoizedProps,y=c.value,Me(Do,l._currentValue),l._currentValue=y,f!==null)if(tn(f.value,y)){if(f.children===c.children&&!Et.current){r=Pn(e,r,o);break e}}else for(f=r.child,f!==null&&(f.return=r);f!==null;){var b=f.dependencies;if(b!==null){y=f.child;for(var C=b.firstContext;C!==null;){if(C.context===l){if(f.tag===1){C=Nn(-1,o&-o),C.tag=2;var M=f.updateQueue;if(M!==null){M=M.shared;var W=M.pending;W===null?C.next=C:(C.next=W.next,W.next=C),M.pending=C}}f.lanes|=o,C=f.alternate,C!==null&&(C.lanes|=o),Ql(f.return,o,r),b.lanes|=o;break}C=C.next}}else if(f.tag===10)y=f.type===r.type?null:f.child;else if(f.tag===18){if(y=f.return,y===null)throw Error(s(341));y.lanes|=o,b=y.alternate,b!==null&&(b.lanes|=o),Ql(y,o,r),y=f.sibling}else y=f.child;if(y!==null)y.return=f;else for(y=f;y!==null;){if(y===r){y=null;break}if(f=y.sibling,f!==null){f.return=y.return,y=f;break}y=y.return}f=y}bt(e,r,c.children,o),r=r.child}return r;case 9:return c=r.type,l=r.pendingProps.children,xs(r,o),c=Ht(c),l=l(c),r.flags|=1,bt(e,r,l,o),r.child;case 14:return l=r.type,c=rn(l,r.pendingProps),c=rn(l.type,c),kh(e,r,l,c,o);case 15:return Ch(e,r,r.type,r.pendingProps,o);case 17:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:rn(l,c),Go(e,r),r.tag=1,kt(l)?(e=!0,Oo(r)):e=!1,xs(r,o),yh(r,l,c),uu(r,l,c,o),hu(null,r,l,!0,e,o);case 19:return Lh(e,r,o);case 22:return Rh(e,r,o)}throw Error(s(156,r.tag))};function sp(e,r){return Id(e,r)}function J0(e,r,o,l){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qt(e,r,o,l){return new J0(e,r,o,l)}function ju(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Z0(e){if(typeof e=="function")return ju(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Te)return 11;if(e===_e)return 14}return 2}function rr(e,r){var o=e.alternate;return o===null?(o=Qt(e.tag,r,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=r,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,r=e.dependencies,o.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function oa(e,r,o,l,c,f){var y=2;if(l=e,typeof e=="function")ju(e)&&(y=1);else if(typeof e=="string")y=5;else e:switch(e){case G:return Lr(o.children,c,f,r);case B:y=8,c|=8;break;case oe:return e=Qt(12,o,r,c|2),e.elementType=oe,e.lanes=f,e;case xe:return e=Qt(13,o,r,c),e.elementType=xe,e.lanes=f,e;case J:return e=Qt(19,o,r,c),e.elementType=J,e.lanes=f,e;case Ee:return aa(o,c,f,r);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ue:y=10;break e;case be:y=9;break e;case Te:y=11;break e;case _e:y=14;break e;case Se:y=16,l=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return r=Qt(y,o,r,c),r.elementType=e,r.type=l,r.lanes=f,r}function Lr(e,r,o,l){return e=Qt(7,e,l,r),e.lanes=o,e}function aa(e,r,o,l){return e=Qt(22,e,l,r),e.elementType=Ee,e.lanes=o,e.stateNode={isHidden:!1},e}function Lu(e,r,o){return e=Qt(6,e,null,r),e.lanes=o,e}function zu(e,r,o){return r=Qt(4,e.children!==null?e.children:[],e.key,r),r.lanes=o,r.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},r}function ew(e,r,o,l,c){this.tag=r,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ll(0),this.expirationTimes=ll(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ll(0),this.identifierPrefix=l,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Iu(e,r,o,l,c,f,y,b,C){return e=new ew(e,r,o,b,C),r===1?(r=1,f===!0&&(r|=8)):r=0,f=Qt(3,null,null,r),e.current=f,f.stateNode=e,f.memoizedState={element:l,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},Gl(f),e}function tw(e,r,o){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),Vu.exports=mw(),Vu.exports}var wp;function gw(){if(wp)return ma;wp=1;var n=ng();return ma.createRoot=n.createRoot,ma.hydrateRoot=n.hydrateRoot,ma}var yw=gw();const vw=Vc(yw),ww=20,xw=1e6,Dn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let qu=0;function bw(){return qu=(qu+1)%Number.MAX_VALUE,qu.toString()}const Qu=new Map,xp=n=>{if(Qu.has(n))return;const t=setTimeout(()=>{Qu.delete(n),Bi({type:Dn.REMOVE_TOAST,toastId:n})},xw);Qu.set(n,t)},Sw=(n,t)=>{switch(t.type){case Dn.ADD_TOAST:return{...n,toasts:[t.toast,...n.toasts].slice(0,ww)};case Dn.UPDATE_TOAST:return{...n,toasts:n.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case Dn.DISMISS_TOAST:{const{toastId:s}=t;return s?xp(s):n.toasts.forEach(i=>{xp(i.id)}),{...n,toasts:n.toasts.map(i=>i.id===s||s===void 0?{...i,open:!1}:i)}}case Dn.REMOVE_TOAST:return t.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(s=>s.id!==t.toastId)}}},ka=[];let Ca={toasts:[]};function Bi(n){Ca=Sw(Ca,n),ka.forEach(t=>{t(Ca)})}function _w({...n}){const t=bw(),s=a=>Bi({type:Dn.UPDATE_TOAST,toast:{...a,id:t}}),i=()=>Bi({type:Dn.DISMISS_TOAST,toastId:t});return Bi({type:Dn.ADD_TOAST,toast:{...n,id:t,open:!0,onOpenChange:a=>{a||i()}}}),{id:t,dismiss:i,update:s}}function Ew(){const[n,t]=_.useState(Ca);return _.useEffect(()=>(ka.push(t),()=>{const s=ka.indexOf(t);s>-1&&ka.splice(s,1)}),[n]),{...n,toast:_w,dismiss:s=>Bi({type:Dn.DISMISS_TOAST,toastId:s})}}var Wc=ng();const kw=Vc(Wc);function Mt(n,t,{checkForDefaultPrevented:s=!0}={}){return function(a){if(n==null||n(a),s===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function bp(n,t){if(typeof n=="function")return n(t);n!=null&&(n.current=t)}function qc(...n){return t=>{let s=!1;const i=n.map(a=>{const u=bp(a,t);return!s&&typeof u=="function"&&(s=!0),u});if(s)return()=>{for(let a=0;a{var S;const{scope:E,children:A,...D}=w,k=((S=E==null?void 0:E[n])==null?void 0:S[m])||h,x=_.useMemo(()=>D,Object.values(D));return p.jsx(k.Provider,{value:x,children:A})};g.displayName=u+"Provider";function v(w,E){var k;const A=((k=E==null?void 0:E[n])==null?void 0:k[m])||h,D=_.useContext(A);if(D)return D;if(d!==void 0)return d;throw new Error(`\`${w}\` must be used within \`${u}\``)}return[g,v]}const a=()=>{const u=s.map(d=>_.createContext(d));return function(h){const m=(h==null?void 0:h[n])||u;return _.useMemo(()=>({[`__scope${n}`]:{...h,[n]:m}}),[h,m])}};return a.scopeName=n,[i,Cw(a,...t)]}function Cw(...n){const t=n[0];if(n.length===1)return t;const s=()=>{const i=n.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(u){const d=i.reduce((h,{useScope:m,scopeName:g})=>{const w=m(u)[`__scope${g}`];return{...h,...w}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:d}),[d])}};return s.scopeName=t.scopeName,s}function Sp(n){const t=Rw(n),s=_.forwardRef((i,a)=>{const{children:u,...d}=i,h=_.Children.toArray(u),m=h.find(Nw);if(m){const g=m.props.children,v=h.map(w=>w===m?_.Children.count(g)>1?_.Children.only(null):_.isValidElement(g)?g.props.children:null:w);return p.jsx(t,{...d,ref:a,children:_.isValidElement(g)?_.cloneElement(g,void 0,v):null})}return p.jsx(t,{...d,ref:a,children:u})});return s.displayName=`${n}.Slot`,s}function Rw(n){const t=_.forwardRef((s,i)=>{const{children:a,...u}=s;if(_.isValidElement(a)){const d=Ow(a),h=Pw(u,a.props);return a.type!==_.Fragment&&(h.ref=i?qc(i,d):d),_.cloneElement(a,h)}return _.Children.count(a)>1?_.Children.only(null):null});return t.displayName=`${n}.SlotClone`,t}var Tw=Symbol("radix.slottable");function Nw(n){return _.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Tw}function Pw(n,t){const s={...t};for(const i in t){const a=n[i],u=t[i];/^on[A-Z]/.test(i)?a&&u?s[i]=(...h)=>{const m=u(...h);return a(...h),m}:a&&(s[i]=a):i==="style"?s[i]={...a,...u}:i==="className"&&(s[i]=[a,u].filter(Boolean).join(" "))}return{...n,...s}}function Ow(n){var i,a;let t=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?n.ref:(t=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}function Aw(n){const t=n+"CollectionProvider",[s,i]=rg(t),[a,u]=s(t,{collectionRef:{current:null},itemMap:new Map}),d=k=>{const{scope:x,children:S}=k,L=ar.useRef(null),O=ar.useRef(new Map).current;return p.jsx(a,{scope:x,itemMap:O,collectionRef:L,children:S})};d.displayName=t;const h=n+"CollectionSlot",m=Sp(h),g=ar.forwardRef((k,x)=>{const{scope:S,children:L}=k,O=u(h,S),j=Xr(x,O.collectionRef);return p.jsx(m,{ref:j,children:L})});g.displayName=h;const v=n+"CollectionItemSlot",w="data-radix-collection-item",E=Sp(v),A=ar.forwardRef((k,x)=>{const{scope:S,children:L,...O}=k,j=ar.useRef(null),V=Xr(x,j),$=u(v,S);return ar.useEffect(()=>($.itemMap.set(j,{ref:j,...O}),()=>void $.itemMap.delete(j))),p.jsx(E,{[w]:"",ref:V,children:L})});A.displayName=v;function D(k){const x=u(n+"CollectionConsumer",k);return ar.useCallback(()=>{const L=x.collectionRef.current;if(!L)return[];const O=Array.from(L.querySelectorAll(`[${w}]`));return Array.from(x.itemMap.values()).sort(($,G)=>O.indexOf($.ref.current)-O.indexOf(G.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:d,Slot:g,ItemSlot:A},D,i]}function jw(n){const t=Lw(n),s=_.forwardRef((i,a)=>{const{children:u,...d}=i,h=_.Children.toArray(u),m=h.find(Iw);if(m){const g=m.props.children,v=h.map(w=>w===m?_.Children.count(g)>1?_.Children.only(null):_.isValidElement(g)?g.props.children:null:w);return p.jsx(t,{...d,ref:a,children:_.isValidElement(g)?_.cloneElement(g,void 0,v):null})}return p.jsx(t,{...d,ref:a,children:u})});return s.displayName=`${n}.Slot`,s}function Lw(n){const t=_.forwardRef((s,i)=>{const{children:a,...u}=s;if(_.isValidElement(a)){const d=Mw(a),h=Dw(u,a.props);return a.type!==_.Fragment&&(h.ref=i?qc(i,d):d),_.cloneElement(a,h)}return _.Children.count(a)>1?_.Children.only(null):null});return t.displayName=`${n}.SlotClone`,t}var zw=Symbol("radix.slottable");function Iw(n){return _.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===zw}function Dw(n,t){const s={...t};for(const i in t){const a=n[i],u=t[i];/^on[A-Z]/.test(i)?a&&u?s[i]=(...h)=>{const m=u(...h);return a(...h),m}:a&&(s[i]=a):i==="style"?s[i]={...a,...u}:i==="className"&&(s[i]=[a,u].filter(Boolean).join(" "))}return{...n,...s}}function Mw(n){var i,a;let t=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?n.ref:(t=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var Fw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Sn=Fw.reduce((n,t)=>{const s=jw(`Primitive.${t}`),i=_.forwardRef((a,u)=>{const{asChild:d,...h}=a,m=d?s:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(m,{...h,ref:u})});return i.displayName=`Primitive.${t}`,{...n,[t]:i}},{});function sg(n,t){n&&Wc.flushSync(()=>n.dispatchEvent(t))}function Jr(n){const t=_.useRef(n);return _.useEffect(()=>{t.current=n}),_.useMemo(()=>(...s)=>{var i;return(i=t.current)==null?void 0:i.call(t,...s)},[])}function Uw(n,t=globalThis==null?void 0:globalThis.document){const s=Jr(n);_.useEffect(()=>{const i=a=>{a.key==="Escape"&&s(a)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[s,t])}var Bw="DismissableLayer",uc="dismissableLayer.update",$w="dismissableLayer.pointerDownOutside",Vw="dismissableLayer.focusOutside",_p,ig=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),og=_.forwardRef((n,t)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:d,onDismiss:h,...m}=n,g=_.useContext(ig),[v,w]=_.useState(null),E=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,A]=_.useState({}),D=Xr(t,G=>w(G)),k=Array.from(g.layers),[x]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),S=k.indexOf(x),L=v?k.indexOf(v):-1,O=g.layersWithOutsidePointerEventsDisabled.size>0,j=L>=S,V=Ww(G=>{const B=G.target,oe=[...g.branches].some(ue=>ue.contains(B));!j||oe||(a==null||a(G),d==null||d(G),G.defaultPrevented||h==null||h())},E),$=qw(G=>{const B=G.target;[...g.branches].some(ue=>ue.contains(B))||(u==null||u(G),d==null||d(G),G.defaultPrevented||h==null||h())},E);return Uw(G=>{L===g.layers.size-1&&(i==null||i(G),!G.defaultPrevented&&h&&(G.preventDefault(),h()))},E),_.useEffect(()=>{if(v)return s&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(_p=E.body.style.pointerEvents,E.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(v)),g.layers.add(v),Ep(),()=>{s&&g.layersWithOutsidePointerEventsDisabled.size===1&&(E.body.style.pointerEvents=_p)}},[v,E,s,g]),_.useEffect(()=>()=>{v&&(g.layers.delete(v),g.layersWithOutsidePointerEventsDisabled.delete(v),Ep())},[v,g]),_.useEffect(()=>{const G=()=>A({});return document.addEventListener(uc,G),()=>document.removeEventListener(uc,G)},[]),p.jsx(Sn.div,{...m,ref:D,style:{pointerEvents:O?j?"auto":"none":void 0,...n.style},onFocusCapture:Mt(n.onFocusCapture,$.onFocusCapture),onBlurCapture:Mt(n.onBlurCapture,$.onBlurCapture),onPointerDownCapture:Mt(n.onPointerDownCapture,V.onPointerDownCapture)})});og.displayName=Bw;var Hw="DismissableLayerBranch",ag=_.forwardRef((n,t)=>{const s=_.useContext(ig),i=_.useRef(null),a=Xr(t,i);return _.useEffect(()=>{const u=i.current;if(u)return s.branches.add(u),()=>{s.branches.delete(u)}},[s.branches]),p.jsx(Sn.div,{...n,ref:a})});ag.displayName=Hw;function Ww(n,t=globalThis==null?void 0:globalThis.document){const s=Jr(n),i=_.useRef(!1),a=_.useRef(()=>{});return _.useEffect(()=>{const u=h=>{if(h.target&&!i.current){let m=function(){lg($w,s,g,{discrete:!0})};const g={originalEvent:h};h.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=m,t.addEventListener("click",a.current,{once:!0})):m()}else t.removeEventListener("click",a.current);i.current=!1},d=window.setTimeout(()=>{t.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),t.removeEventListener("pointerdown",u),t.removeEventListener("click",a.current)}},[t,s]),{onPointerDownCapture:()=>i.current=!0}}function qw(n,t=globalThis==null?void 0:globalThis.document){const s=Jr(n),i=_.useRef(!1);return _.useEffect(()=>{const a=u=>{u.target&&!i.current&&lg(Vw,s,{originalEvent:u},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,s]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Ep(){const n=new CustomEvent(uc);document.dispatchEvent(n)}function lg(n,t,s,{discrete:i}){const a=s.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:s});t&&a.addEventListener(n,t,{once:!0}),i?sg(a,u):a.dispatchEvent(u)}var Qw=og,Kw=ag,Vi=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},Gw="Portal",ug=_.forwardRef((n,t)=>{var h;const{container:s,...i}=n,[a,u]=_.useState(!1);Vi(()=>u(!0),[]);const d=s||a&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return d?kw.createPortal(p.jsx(Sn.div,{...i,ref:t}),d):null});ug.displayName=Gw;function Yw(n,t){return _.useReducer((s,i)=>t[s][i]??s,n)}var cg=n=>{const{present:t,children:s}=n,i=Xw(t),a=typeof s=="function"?s({present:i.isPresent}):_.Children.only(s),u=Xr(i.ref,Jw(a));return typeof s=="function"||i.isPresent?_.cloneElement(a,{ref:u}):null};cg.displayName="Presence";function Xw(n){const[t,s]=_.useState(),i=_.useRef(null),a=_.useRef(n),u=_.useRef("none"),d=n?"mounted":"unmounted",[h,m]=Yw(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const g=ga(i.current);u.current=h==="mounted"?g:"none"},[h]),Vi(()=>{const g=i.current,v=a.current;if(v!==n){const E=u.current,A=ga(g);n?m("MOUNT"):A==="none"||(g==null?void 0:g.display)==="none"?m("UNMOUNT"):m(v&&E!==A?"ANIMATION_OUT":"UNMOUNT"),a.current=n}},[n,m]),Vi(()=>{if(t){let g;const v=t.ownerDocument.defaultView??window,w=A=>{const k=ga(i.current).includes(CSS.escape(A.animationName));if(A.target===t&&k&&(m("ANIMATION_END"),!a.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",g=v.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},E=A=>{A.target===t&&(u.current=ga(i.current))};return t.addEventListener("animationstart",E),t.addEventListener("animationcancel",w),t.addEventListener("animationend",w),()=>{v.clearTimeout(g),t.removeEventListener("animationstart",E),t.removeEventListener("animationcancel",w),t.removeEventListener("animationend",w)}}else m("ANIMATION_END")},[t,m]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:_.useCallback(g=>{i.current=g?getComputedStyle(g):null,s(g)},[])}}function ga(n){return(n==null?void 0:n.animationName)||"none"}function Jw(n){var i,a;let t=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?n.ref:(t=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var Zw=tg[" useInsertionEffect ".trim().toString()]||Vi;function ex({prop:n,defaultProp:t,onChange:s=()=>{},caller:i}){const[a,u,d]=tx({defaultProp:t,onChange:s}),h=n!==void 0,m=h?n:a;{const v=_.useRef(n!==void 0);_.useEffect(()=>{const w=v.current;w!==h&&console.warn(`${i} is changing from ${w?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=h},[h,i])}const g=_.useCallback(v=>{var w;if(h){const E=nx(v)?v(n):v;E!==n&&((w=d.current)==null||w.call(d,E))}else u(v)},[h,n,u,d]);return[m,g]}function tx({defaultProp:n,onChange:t}){const[s,i]=_.useState(n),a=_.useRef(s),u=_.useRef(t);return Zw(()=>{u.current=t},[t]),_.useEffect(()=>{var d;a.current!==s&&((d=u.current)==null||d.call(u,s),a.current=s)},[s,a]),[s,i,u]}function nx(n){return typeof n=="function"}var rx=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),sx="VisuallyHidden",Qc=_.forwardRef((n,t)=>p.jsx(Sn.span,{...n,ref:t,style:{...rx,...n.style}}));Qc.displayName=sx;var Kc="ToastProvider",[Gc,ix,ox]=Aw("Toast"),[dg]=rg("Toast",[ox]),[ax,Ba]=dg(Kc),fg=n=>{const{__scopeToast:t,label:s="Notification",duration:i=5e3,swipeDirection:a="right",swipeThreshold:u=50,children:d}=n,[h,m]=_.useState(null),[g,v]=_.useState(0),w=_.useRef(!1),E=_.useRef(!1);return s.trim()||console.error(`Invalid prop \`label\` supplied to \`${Kc}\`. Expected non-empty \`string\`.`),p.jsx(Gc.Provider,{scope:t,children:p.jsx(ax,{scope:t,label:s,duration:i,swipeDirection:a,swipeThreshold:u,toastCount:g,viewport:h,onViewportChange:m,onToastAdd:_.useCallback(()=>v(A=>A+1),[]),onToastRemove:_.useCallback(()=>v(A=>A-1),[]),isFocusedToastEscapeKeyDownRef:w,isClosePausedRef:E,children:d})})};fg.displayName=Kc;var hg="ToastViewport",lx=["F8"],cc="toast.viewportPause",dc="toast.viewportResume",pg=_.forwardRef((n,t)=>{const{__scopeToast:s,hotkey:i=lx,label:a="Notifications ({hotkey})",...u}=n,d=Ba(hg,s),h=ix(s),m=_.useRef(null),g=_.useRef(null),v=_.useRef(null),w=_.useRef(null),E=Xr(t,w,d.onViewportChange),A=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),D=d.toastCount>0;_.useEffect(()=>{const x=S=>{var O;i.length!==0&&i.every(j=>S[j]||S.code===j)&&((O=w.current)==null||O.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[i]),_.useEffect(()=>{const x=m.current,S=w.current;if(D&&x&&S){const L=()=>{if(!d.isClosePausedRef.current){const $=new CustomEvent(cc);S.dispatchEvent($),d.isClosePausedRef.current=!0}},O=()=>{if(d.isClosePausedRef.current){const $=new CustomEvent(dc);S.dispatchEvent($),d.isClosePausedRef.current=!1}},j=$=>{!x.contains($.relatedTarget)&&O()},V=()=>{x.contains(document.activeElement)||O()};return x.addEventListener("focusin",L),x.addEventListener("focusout",j),x.addEventListener("pointermove",L),x.addEventListener("pointerleave",V),window.addEventListener("blur",L),window.addEventListener("focus",O),()=>{x.removeEventListener("focusin",L),x.removeEventListener("focusout",j),x.removeEventListener("pointermove",L),x.removeEventListener("pointerleave",V),window.removeEventListener("blur",L),window.removeEventListener("focus",O)}}},[D,d.isClosePausedRef]);const k=_.useCallback(({tabbingDirection:x})=>{const L=h().map(O=>{const j=O.ref.current,V=[j,...bx(j)];return x==="forwards"?V:V.reverse()});return(x==="forwards"?L.reverse():L).flat()},[h]);return _.useEffect(()=>{const x=w.current;if(x){const S=L=>{var V,$,G;const O=L.altKey||L.ctrlKey||L.metaKey;if(L.key==="Tab"&&!O){const B=document.activeElement,oe=L.shiftKey;if(L.target===x&&oe){(V=g.current)==null||V.focus();return}const Te=k({tabbingDirection:oe?"backwards":"forwards"}),xe=Te.findIndex(J=>J===B);Ku(Te.slice(xe+1))?L.preventDefault():oe?($=g.current)==null||$.focus():(G=v.current)==null||G.focus()}};return x.addEventListener("keydown",S),()=>x.removeEventListener("keydown",S)}},[h,k]),p.jsxs(Kw,{ref:m,role:"region","aria-label":a.replace("{hotkey}",A),tabIndex:-1,style:{pointerEvents:D?void 0:"none"},children:[D&&p.jsx(fc,{ref:g,onFocusFromOutsideViewport:()=>{const x=k({tabbingDirection:"forwards"});Ku(x)}}),p.jsx(Gc.Slot,{scope:s,children:p.jsx(Sn.ol,{tabIndex:-1,...u,ref:E})}),D&&p.jsx(fc,{ref:v,onFocusFromOutsideViewport:()=>{const x=k({tabbingDirection:"backwards"});Ku(x)}})]})});pg.displayName=hg;var mg="ToastFocusProxy",fc=_.forwardRef((n,t)=>{const{__scopeToast:s,onFocusFromOutsideViewport:i,...a}=n,u=Ba(mg,s);return p.jsx(Qc,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:d=>{var g;const h=d.relatedTarget;!((g=u.viewport)!=null&&g.contains(h))&&i()}})});fc.displayName=mg;var Ji="Toast",ux="toast.swipeStart",cx="toast.swipeMove",dx="toast.swipeCancel",fx="toast.swipeEnd",gg=_.forwardRef((n,t)=>{const{forceMount:s,open:i,defaultOpen:a,onOpenChange:u,...d}=n,[h,m]=ex({prop:i,defaultProp:a??!0,onChange:u,caller:Ji});return p.jsx(cg,{present:s||h,children:p.jsx(mx,{open:h,...d,ref:t,onClose:()=>m(!1),onPause:Jr(n.onPause),onResume:Jr(n.onResume),onSwipeStart:Mt(n.onSwipeStart,g=>{g.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Mt(n.onSwipeMove,g=>{const{x:v,y:w}=g.detail.delta;g.currentTarget.setAttribute("data-swipe","move"),g.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${v}px`),g.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${w}px`)}),onSwipeCancel:Mt(n.onSwipeCancel,g=>{g.currentTarget.setAttribute("data-swipe","cancel"),g.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),g.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),g.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),g.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Mt(n.onSwipeEnd,g=>{const{x:v,y:w}=g.detail.delta;g.currentTarget.setAttribute("data-swipe","end"),g.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),g.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),g.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${v}px`),g.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${w}px`),m(!1)})})})});gg.displayName=Ji;var[hx,px]=dg(Ji,{onClose(){}}),mx=_.forwardRef((n,t)=>{const{__scopeToast:s,type:i="foreground",duration:a,open:u,onClose:d,onEscapeKeyDown:h,onPause:m,onResume:g,onSwipeStart:v,onSwipeMove:w,onSwipeCancel:E,onSwipeEnd:A,...D}=n,k=Ba(Ji,s),[x,S]=_.useState(null),L=Xr(t,J=>S(J)),O=_.useRef(null),j=_.useRef(null),V=a||k.duration,$=_.useRef(0),G=_.useRef(V),B=_.useRef(0),{onToastAdd:oe,onToastRemove:ue}=k,be=Jr(()=>{var _e;(x==null?void 0:x.contains(document.activeElement))&&((_e=k.viewport)==null||_e.focus()),d()}),Te=_.useCallback(J=>{!J||J===1/0||(window.clearTimeout(B.current),$.current=new Date().getTime(),B.current=window.setTimeout(be,J))},[be]);_.useEffect(()=>{const J=k.viewport;if(J){const _e=()=>{Te(G.current),g==null||g()},Se=()=>{const Ee=new Date().getTime()-$.current;G.current=G.current-Ee,window.clearTimeout(B.current),m==null||m()};return J.addEventListener(cc,Se),J.addEventListener(dc,_e),()=>{J.removeEventListener(cc,Se),J.removeEventListener(dc,_e)}}},[k.viewport,V,m,g,Te]),_.useEffect(()=>{u&&!k.isClosePausedRef.current&&Te(V)},[u,V,k.isClosePausedRef,Te]),_.useEffect(()=>(oe(),()=>ue()),[oe,ue]);const xe=_.useMemo(()=>x?_g(x):null,[x]);return k.viewport?p.jsxs(p.Fragment,{children:[xe&&p.jsx(gx,{__scopeToast:s,role:"status","aria-live":i==="foreground"?"assertive":"polite",children:xe}),p.jsx(hx,{scope:s,onClose:be,children:Wc.createPortal(p.jsx(Gc.ItemSlot,{scope:s,children:p.jsx(Qw,{asChild:!0,onEscapeKeyDown:Mt(h,()=>{k.isFocusedToastEscapeKeyDownRef.current||be(),k.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(Sn.li,{tabIndex:0,"data-state":u?"open":"closed","data-swipe-direction":k.swipeDirection,...D,ref:L,style:{userSelect:"none",touchAction:"none",...n.style},onKeyDown:Mt(n.onKeyDown,J=>{J.key==="Escape"&&(h==null||h(J.nativeEvent),J.nativeEvent.defaultPrevented||(k.isFocusedToastEscapeKeyDownRef.current=!0,be()))}),onPointerDown:Mt(n.onPointerDown,J=>{J.button===0&&(O.current={x:J.clientX,y:J.clientY})}),onPointerMove:Mt(n.onPointerMove,J=>{if(!O.current)return;const _e=J.clientX-O.current.x,Se=J.clientY-O.current.y,Ee=!!j.current,K=["left","right"].includes(k.swipeDirection),ae=["left","up"].includes(k.swipeDirection)?Math.min:Math.max,F=K?ae(0,_e):0,N=K?0:ae(0,Se),U=J.pointerType==="touch"?10:2,ce={x:F,y:N},me={originalEvent:J,delta:ce};Ee?(j.current=ce,ya(cx,w,me,{discrete:!1})):kp(ce,k.swipeDirection,U)?(j.current=ce,ya(ux,v,me,{discrete:!1}),J.target.setPointerCapture(J.pointerId)):(Math.abs(_e)>U||Math.abs(Se)>U)&&(O.current=null)}),onPointerUp:Mt(n.onPointerUp,J=>{const _e=j.current,Se=J.target;if(Se.hasPointerCapture(J.pointerId)&&Se.releasePointerCapture(J.pointerId),j.current=null,O.current=null,_e){const Ee=J.currentTarget,K={originalEvent:J,delta:_e};kp(_e,k.swipeDirection,k.swipeThreshold)?ya(fx,A,K,{discrete:!0}):ya(dx,E,K,{discrete:!0}),Ee.addEventListener("click",ae=>ae.preventDefault(),{once:!0})}})})})}),k.viewport)})]}):null}),gx=n=>{const{__scopeToast:t,children:s,...i}=n,a=Ba(Ji,t),[u,d]=_.useState(!1),[h,m]=_.useState(!1);return wx(()=>d(!0)),_.useEffect(()=>{const g=window.setTimeout(()=>m(!0),1e3);return()=>window.clearTimeout(g)},[]),h?null:p.jsx(ug,{asChild:!0,children:p.jsx(Qc,{...i,children:u&&p.jsxs(p.Fragment,{children:[a.label," ",s]})})})},yx="ToastTitle",yg=_.forwardRef((n,t)=>{const{__scopeToast:s,...i}=n;return p.jsx(Sn.div,{...i,ref:t})});yg.displayName=yx;var vx="ToastDescription",vg=_.forwardRef((n,t)=>{const{__scopeToast:s,...i}=n;return p.jsx(Sn.div,{...i,ref:t})});vg.displayName=vx;var wg="ToastAction",xg=_.forwardRef((n,t)=>{const{altText:s,...i}=n;return s.trim()?p.jsx(Sg,{altText:s,asChild:!0,children:p.jsx(Yc,{...i,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${wg}\`. Expected non-empty \`string\`.`),null)});xg.displayName=wg;var bg="ToastClose",Yc=_.forwardRef((n,t)=>{const{__scopeToast:s,...i}=n,a=px(bg,s);return p.jsx(Sg,{asChild:!0,children:p.jsx(Sn.button,{type:"button",...i,ref:t,onClick:Mt(n.onClick,a.onClose)})})});Yc.displayName=bg;var Sg=_.forwardRef((n,t)=>{const{__scopeToast:s,altText:i,...a}=n;return p.jsx(Sn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...a,ref:t})});function _g(n){const t=[];return Array.from(n.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&t.push(i.textContent),xx(i)){const a=i.ariaHidden||i.hidden||i.style.display==="none",u=i.dataset.radixToastAnnounceExclude==="";if(!a)if(u){const d=i.dataset.radixToastAnnounceAlt;d&&t.push(d)}else t.push(..._g(i))}}),t}function ya(n,t,s,{discrete:i}){const a=s.originalEvent.currentTarget,u=new CustomEvent(n,{bubbles:!0,cancelable:!0,detail:s});t&&a.addEventListener(n,t,{once:!0}),i?sg(a,u):a.dispatchEvent(u)}var kp=(n,t,s=0)=>{const i=Math.abs(n.x),a=Math.abs(n.y),u=i>a;return t==="left"||t==="right"?u&&i>s:!u&&a>s};function wx(n=()=>{}){const t=Jr(n);Vi(()=>{let s=0,i=0;return s=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(s),window.cancelAnimationFrame(i)}},[t])}function xx(n){return n.nodeType===n.ELEMENT_NODE}function bx(n){const t=[],s=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const a=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||a?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)t.push(s.currentNode);return t}function Ku(n){const t=document.activeElement;return n.some(s=>s===t?!0:(s.focus(),document.activeElement!==t))}var Sx=fg,Eg=pg,kg=gg,Cg=yg,Rg=vg,Tg=xg,Ng=Yc;function Pg(n){var t,s,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var a=n.length;for(t=0;ttypeof n=="boolean"?`${n}`:n===0?"0":n,Rp=Og,_x=(n,t)=>s=>{var i;if((t==null?void 0:t.variants)==null)return Rp(n,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:a,defaultVariants:u}=t,d=Object.keys(a).map(g=>{const v=s==null?void 0:s[g],w=u==null?void 0:u[g];if(v===null)return null;const E=Cp(v)||Cp(w);return a[g][E]}),h=s&&Object.entries(s).reduce((g,v)=>{let[w,E]=v;return E===void 0||(g[w]=E),g},{}),m=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((g,v)=>{let{class:w,className:E,...A}=v;return Object.entries(A).every(D=>{let[k,x]=D;return Array.isArray(x)?x.includes({...u,...h}[k]):{...u,...h}[k]===x})?[...g,w,E]:g},[]);return Rp(n,d,m,s==null?void 0:s.class,s==null?void 0:s.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ex=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ag=(...n)=>n.filter((t,s,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===s).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var kx={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Cx=_.forwardRef(({color:n="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:a="",children:u,iconNode:d,...h},m)=>_.createElement("svg",{ref:m,...kx,width:t,height:t,stroke:n,strokeWidth:i?Number(s)*24/Number(t):s,className:Ag("lucide",a),...h},[...d.map(([g,v])=>_.createElement(g,v)),...Array.isArray(u)?u:[u]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Xe=(n,t)=>{const s=_.forwardRef(({className:i,...a},u)=>_.createElement(Cx,{ref:u,iconNode:t,className:Ag(`lucide-${Ex(n)}`,i),...a}));return s.displayName=`${n}`,s};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Rx=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],$a=Xe("ArrowRight",Rx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Tx=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],Nx=Xe("ChartColumn",Tx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Px=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ox=Xe("Check",Px);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ax=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],jx=Xe("ChevronDown",Ax);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Lx=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],zx=Xe("ChevronRight",Lx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ix=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Xc=Xe("Download",Ix);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Dx=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Mx=Xe("Grid3x3",Dx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fx=[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]],Ux=Xe("Linkedin",Fx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Bx=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],$x=Xe("Lock",Bx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Vx=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Hx=Xe("MapPin",Vx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Wx=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],qx=Xe("Menu",Wx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Qx=[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]],Kx=Xe("Radio",Qx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Gx=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Yx=Xe("Server",Gx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Xx=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Jx=Xe("Settings",Xx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Zx=[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]],e1=Xe("Truck",Zx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const t1=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]],n1=Xe("Twitter",t1);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const r1=[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]],s1=Xe("Waves",r1);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const i1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],jg=Xe("X",i1);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const o1=[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]],a1=Xe("Youtube",o1);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const l1=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],u1=Xe("Zap",l1),c1=(n,t)=>{const s=new Array(n.length+t.length);for(let i=0;i({classGroupId:n,validator:t}),Lg=(n=new Map,t=null,s)=>({nextPart:n,validators:t,classGroupId:s}),La="-",Tp=[],f1="arbitrary..",h1=n=>{const t=m1(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return p1(d);const h=d.split(La),m=h[0]===""&&h.length>1?1:0;return zg(h,m,t)},getConflictingClassGroupIds:(d,h)=>{if(h){const m=i[d],g=s[d];return m?g?c1(g,m):m:g||Tp}return s[d]||Tp}}},zg=(n,t,s)=>{if(n.length-t===0)return s.classGroupId;const a=n[t],u=s.nextPart.get(a);if(u){const g=zg(n,t+1,u);if(g)return g}const d=s.validators;if(d===null)return;const h=t===0?n.join(La):n.slice(t).join(La),m=d.length;for(let g=0;gn.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=n.slice(1,-1),s=t.indexOf(":"),i=t.slice(0,s);return i?f1+i:void 0})(),m1=n=>{const{theme:t,classGroups:s}=n;return g1(s,t)},g1=(n,t)=>{const s=Lg();for(const i in n){const a=n[i];Jc(a,s,i,t)}return s},Jc=(n,t,s,i)=>{const a=n.length;for(let u=0;u{if(typeof n=="string"){v1(n,t,s);return}if(typeof n=="function"){w1(n,t,s,i);return}x1(n,t,s,i)},v1=(n,t,s)=>{const i=n===""?t:Ig(t,n);i.classGroupId=s},w1=(n,t,s,i)=>{if(b1(n)){Jc(n(i),t,s,i);return}t.validators===null&&(t.validators=[]),t.validators.push(d1(s,n))},x1=(n,t,s,i)=>{const a=Object.entries(n),u=a.length;for(let d=0;d{let s=n;const i=t.split(La),a=i.length;for(let u=0;u"isThemeGetter"in n&&n.isThemeGetter===!0,S1=n=>{if(n<1)return{get:()=>{},set:()=>{}};let t=0,s=Object.create(null),i=Object.create(null);const a=(u,d)=>{s[u]=d,t++,t>n&&(t=0,i=s,s=Object.create(null))};return{get(u){let d=s[u];if(d!==void 0)return d;if((d=i[u])!==void 0)return a(u,d),d},set(u,d){u in s?s[u]=d:a(u,d)}}},hc="!",Np=":",_1=[],Pp=(n,t,s,i,a)=>({modifiers:n,hasImportantModifier:t,baseClassName:s,maybePostfixModifierPosition:i,isExternal:a}),E1=n=>{const{prefix:t,experimentalParseClassName:s}=n;let i=a=>{const u=[];let d=0,h=0,m=0,g;const v=a.length;for(let k=0;km?g-m:void 0;return Pp(u,A,E,D)};if(t){const a=t+Np,u=i;i=d=>d.startsWith(a)?u(d.slice(a.length)):Pp(_1,!1,d,void 0,!0)}if(s){const a=i;i=u=>s({className:u,parseClassName:a})}return i},k1=n=>{const t=new Map;return n.orderSensitiveModifiers.forEach((s,i)=>{t.set(s,1e6+i)}),s=>{const i=[];let a=[];for(let u=0;u0&&(a.sort(),i.push(...a),a=[]),i.push(d)):a.push(d)}return a.length>0&&(a.sort(),i.push(...a)),i}},C1=n=>({cache:S1(n.cacheSize),parseClassName:E1(n),sortModifiers:k1(n),...h1(n)}),R1=/\s+/,T1=(n,t)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:a,sortModifiers:u}=t,d=[],h=n.trim().split(R1);let m="";for(let g=h.length-1;g>=0;g-=1){const v=h[g],{isExternal:w,modifiers:E,hasImportantModifier:A,baseClassName:D,maybePostfixModifierPosition:k}=s(v);if(w){m=v+(m.length>0?" "+m:m);continue}let x=!!k,S=i(x?D.substring(0,k):D);if(!S){if(!x){m=v+(m.length>0?" "+m:m);continue}if(S=i(D),!S){m=v+(m.length>0?" "+m:m);continue}x=!1}const L=E.length===0?"":E.length===1?E[0]:u(E).join(":"),O=A?L+hc:L,j=O+S;if(d.indexOf(j)>-1)continue;d.push(j);const V=a(S,x);for(let $=0;$0?" "+m:m)}return m},N1=(...n)=>{let t=0,s,i,a="";for(;t{if(typeof n=="string")return n;let t,s="";for(let i=0;i{let s,i,a,u;const d=m=>{const g=t.reduce((v,w)=>w(v),n());return s=C1(g),i=s.cache.get,a=s.cache.set,u=h,h(m)},h=m=>{const g=i(m);if(g)return g;const v=T1(m,s);return a(m,v),v};return u=d,(...m)=>u(N1(...m))},O1=[],et=n=>{const t=s=>s[n]||O1;return t.isThemeGetter=!0,t},Mg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Fg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,A1=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,j1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,L1=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,z1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,I1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,D1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ir=n=>A1.test(n),ke=n=>!!n&&!Number.isNaN(Number(n)),or=n=>!!n&&Number.isInteger(Number(n)),Gu=n=>n.endsWith("%")&&ke(n.slice(0,-1)),An=n=>j1.test(n),Ug=()=>!0,M1=n=>L1.test(n)&&!z1.test(n),Zc=()=>!1,F1=n=>I1.test(n),U1=n=>D1.test(n),B1=n=>!re(n)&&!se(n),$1=n=>xr(n,Vg,Zc),re=n=>Mg.test(n),zr=n=>xr(n,Hg,M1),Op=n=>xr(n,Y1,ke),V1=n=>xr(n,qg,Ug),H1=n=>xr(n,Wg,Zc),Ap=n=>xr(n,Bg,Zc),W1=n=>xr(n,$g,U1),va=n=>xr(n,Qg,F1),se=n=>Fg.test(n),Ai=n=>ns(n,Hg),q1=n=>ns(n,Wg),jp=n=>ns(n,Bg),Q1=n=>ns(n,Vg),K1=n=>ns(n,$g),wa=n=>ns(n,Qg,!0),G1=n=>ns(n,qg,!0),xr=(n,t,s)=>{const i=Mg.exec(n);return i?i[1]?t(i[1]):s(i[2]):!1},ns=(n,t,s=!1)=>{const i=Fg.exec(n);return i?i[1]?t(i[1]):s:!1},Bg=n=>n==="position"||n==="percentage",$g=n=>n==="image"||n==="url",Vg=n=>n==="length"||n==="size"||n==="bg-size",Hg=n=>n==="length",Y1=n=>n==="number",Wg=n=>n==="family-name",qg=n=>n==="number"||n==="weight",Qg=n=>n==="shadow",X1=()=>{const n=et("color"),t=et("font"),s=et("text"),i=et("font-weight"),a=et("tracking"),u=et("leading"),d=et("breakpoint"),h=et("container"),m=et("spacing"),g=et("radius"),v=et("shadow"),w=et("inset-shadow"),E=et("text-shadow"),A=et("drop-shadow"),D=et("blur"),k=et("perspective"),x=et("aspect"),S=et("ease"),L=et("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...j(),se,re],$=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],B=()=>[se,re,m],oe=()=>[ir,"full","auto",...B()],ue=()=>[or,"none","subgrid",se,re],be=()=>["auto",{span:["full",or,se,re]},or,se,re],Te=()=>[or,"auto",se,re],xe=()=>["auto","min","max","fr",se,re],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_e=()=>["start","end","center","stretch","center-safe","end-safe"],Se=()=>["auto",...B()],Ee=()=>[ir,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],K=()=>[ir,"screen","full","dvw","lvw","svw","min","max","fit",...B()],ae=()=>[ir,"screen","full","lh","dvh","lvh","svh","min","max","fit",...B()],F=()=>[n,se,re],N=()=>[...j(),jp,Ap,{position:[se,re]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ce=()=>["auto","cover","contain",Q1,$1,{size:[se,re]}],me=()=>[Gu,Ai,zr],he=()=>["","none","full",g,se,re],Y=()=>["",ke,Ai,zr],ve=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ye=()=>[ke,Gu,jp,Ap],tt=()=>["","none",D,se,re],Ft=()=>["none",ke,se,re],ot=()=>["none",ke,se,re],Xt=()=>[ke,se,re],Ut=()=>[ir,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[An],breakpoint:[An],color:[Ug],container:[An],"drop-shadow":[An],ease:["in","out","in-out"],font:[B1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[An],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[An],shadow:[An],spacing:["px",ke],text:[An],"text-shadow":[An],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ir,re,se,x]}],container:["container"],columns:[{columns:[ke,re,se,h]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:V()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:oe()}],"inset-x":[{"inset-x":oe()}],"inset-y":[{"inset-y":oe()}],start:[{"inset-s":oe(),start:oe()}],end:[{"inset-e":oe(),end:oe()}],"inset-bs":[{"inset-bs":oe()}],"inset-be":[{"inset-be":oe()}],top:[{top:oe()}],right:[{right:oe()}],bottom:[{bottom:oe()}],left:[{left:oe()}],visibility:["visible","invisible","collapse"],z:[{z:[or,"auto",se,re]}],basis:[{basis:[ir,"full","auto",h,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,ir,"auto","initial","none",re]}],grow:[{grow:["",ke,se,re]}],shrink:[{shrink:["",ke,se,re]}],order:[{order:[or,"first","last","none",se,re]}],"grid-cols":[{"grid-cols":ue()}],"col-start-end":[{col:be()}],"col-start":[{"col-start":Te()}],"col-end":[{"col-end":Te()}],"grid-rows":[{"grid-rows":ue()}],"row-start-end":[{row:be()}],"row-start":[{"row-start":Te()}],"row-end":[{"row-end":Te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":xe()}],"auto-rows":[{"auto-rows":xe()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[..._e(),"normal"]}],"justify-self":[{"justify-self":["auto",..._e()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[..._e(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._e(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[..._e(),"baseline"]}],"place-self":[{"place-self":["auto",..._e()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pbs:[{pbs:B()}],pbe:[{pbe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:Se()}],mx:[{mx:Se()}],my:[{my:Se()}],ms:[{ms:Se()}],me:[{me:Se()}],mbs:[{mbs:Se()}],mbe:[{mbe:Se()}],mt:[{mt:Se()}],mr:[{mr:Se()}],mb:[{mb:Se()}],ml:[{ml:Se()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:Ee()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[h,"screen",...Ee()]}],"min-w":[{"min-w":[h,"screen","none",...Ee()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[d]},...Ee()]}],h:[{h:["screen","lh",...Ee()]}],"min-h":[{"min-h":["screen","lh","none",...Ee()]}],"max-h":[{"max-h":["screen","lh",...Ee()]}],"font-size":[{text:["base",s,Ai,zr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,G1,V1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Gu,re]}],"font-family":[{font:[q1,H1,t]}],"font-features":[{"font-features":[re]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,se,re]}],"line-clamp":[{"line-clamp":[ke,"none",se,Op]}],leading:[{leading:[u,...B()]}],"list-image":[{"list-image":["none",se,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",se,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",se,zr]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[ke,"auto",se,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se,re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",se,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},or,se,re],radial:["",se,re],conic:[or,se,re]},K1,W1]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:me()}],"gradient-via-pos":[{via:me()}],"gradient-to-pos":[{to:me()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-bs":[{"border-bs":Y()}],"border-w-be":[{"border-be":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,se,re]}],"outline-w":[{outline:["",ke,Ai,zr]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",v,wa,va]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",w,wa,va]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[ke,zr]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",E,wa,va]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[ke,se,re]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[se,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":j()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",se,re]}],filter:[{filter:["","none",se,re]}],blur:[{blur:tt()}],brightness:[{brightness:[ke,se,re]}],contrast:[{contrast:[ke,se,re]}],"drop-shadow":[{"drop-shadow":["","none",A,wa,va]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",ke,se,re]}],"hue-rotate":[{"hue-rotate":[ke,se,re]}],invert:[{invert:["",ke,se,re]}],saturate:[{saturate:[ke,se,re]}],sepia:[{sepia:["",ke,se,re]}],"backdrop-filter":[{"backdrop-filter":["","none",se,re]}],"backdrop-blur":[{"backdrop-blur":tt()}],"backdrop-brightness":[{"backdrop-brightness":[ke,se,re]}],"backdrop-contrast":[{"backdrop-contrast":[ke,se,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,se,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,se,re]}],"backdrop-invert":[{"backdrop-invert":["",ke,se,re]}],"backdrop-opacity":[{"backdrop-opacity":[ke,se,re]}],"backdrop-saturate":[{"backdrop-saturate":[ke,se,re]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,se,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",se,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",se,re]}],ease:[{ease:["linear","initial",S,se,re]}],delay:[{delay:[ke,se,re]}],animate:[{animate:["none",L,se,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,se,re]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:Ft()}],"rotate-x":[{"rotate-x":Ft()}],"rotate-y":[{"rotate-y":Ft()}],"rotate-z":[{"rotate-z":Ft()}],scale:[{scale:ot()}],"scale-x":[{"scale-x":ot()}],"scale-y":[{"scale-y":ot()}],"scale-z":[{"scale-z":ot()}],"scale-3d":["scale-3d"],skew:[{skew:Xt()}],"skew-x":[{"skew-x":Xt()}],"skew-y":[{"skew-y":Xt()}],transform:[{transform:[se,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ut()}],"translate-x":[{"translate-x":Ut()}],"translate-y":[{"translate-y":Ut()}],"translate-z":[{"translate-z":Ut()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se,re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mbs":[{"scroll-mbs":B()}],"scroll-mbe":[{"scroll-mbe":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pbs":[{"scroll-pbs":B()}],"scroll-pbe":[{"scroll-pbe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",se,re]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[ke,Ai,zr,Op]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},J1=P1(X1);function br(...n){return J1(Og(n))}const Z1=Sx,Kg=_.forwardRef(({className:n,...t},s)=>p.jsx(Eg,{ref:s,className:br("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",n),...t}));Kg.displayName=Eg.displayName;const eb=_x("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Gg=_.forwardRef(({className:n,variant:t,...s},i)=>p.jsx(kg,{ref:i,className:br(eb({variant:t}),n),...s}));Gg.displayName=kg.displayName;const tb=_.forwardRef(({className:n,...t},s)=>p.jsx(Tg,{ref:s,className:br("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",n),...t}));tb.displayName=Tg.displayName;const Yg=_.forwardRef(({className:n,...t},s)=>p.jsx(Ng,{ref:s,className:br("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",n),"toast-close":"",...t,children:p.jsx(jg,{className:"h-4 w-4"})}));Yg.displayName=Ng.displayName;const Xg=_.forwardRef(({className:n,...t},s)=>p.jsx(Cg,{ref:s,className:br("text-sm font-semibold",n),...t}));Xg.displayName=Cg.displayName;const Jg=_.forwardRef(({className:n,...t},s)=>p.jsx(Rg,{ref:s,className:br("text-sm opacity-90",n),...t}));Jg.displayName=Rg.displayName;function nb(){const{toasts:n}=Ew();return p.jsxs(Z1,{children:[n.map(function({id:t,title:s,description:i,action:a,...u}){return p.jsxs(Gg,{...u,children:[p.jsxs("div",{className:"grid gap-1",children:[s&&p.jsx(Xg,{children:s}),i&&p.jsx(Jg,{children:i})]}),a,p.jsx(Yg,{})]},t)}),p.jsx(Kg,{})]})}var Zi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},rb={setTimeout:(n,t)=>setTimeout(n,t),clearTimeout:n=>clearTimeout(n),setInterval:(n,t)=>setInterval(n,t),clearInterval:n=>clearInterval(n)},ur,$c,Hm,sb=(Hm=class{constructor(){pe(this,ur,rb);pe(this,$c,!1)}setTimeoutProvider(n){ee(this,ur,n)}setTimeout(n,t){return R(this,ur).setTimeout(n,t)}clearTimeout(n){R(this,ur).clearTimeout(n)}setInterval(n,t){return R(this,ur).setInterval(n,t)}clearInterval(n){R(this,ur).clearInterval(n)}},ur=new WeakMap,$c=new WeakMap,Hm),Mr=new sb;function ib(n){setTimeout(n,0)}var Zr=typeof window>"u"||"Deno"in globalThis;function Ot(){}function ob(n,t){return typeof n=="function"?n(t):n}function pc(n){return typeof n=="number"&&n>=0&&n!==1/0}function Zg(n,t){return Math.max(n+(t||0)-Date.now(),0)}function vr(n,t){return typeof n=="function"?n(t):n}function Gt(n,t){return typeof n=="function"?n(t):n}function Lp(n,t){const{type:s="all",exact:i,fetchStatus:a,predicate:u,queryKey:d,stale:h}=n;if(d){if(i){if(t.queryHash!==ed(d,t.options))return!1}else if(!Wi(t.queryKey,d))return!1}if(s!=="all"){const m=t.isActive();if(s==="active"&&!m||s==="inactive"&&m)return!1}return!(typeof h=="boolean"&&t.isStale()!==h||a&&a!==t.state.fetchStatus||u&&!u(t))}function zp(n,t){const{exact:s,status:i,predicate:a,mutationKey:u}=n;if(u){if(!t.options.mutationKey)return!1;if(s){if(Hi(t.options.mutationKey)!==Hi(u))return!1}else if(!Wi(t.options.mutationKey,u))return!1}return!(i&&t.state.status!==i||a&&!a(t))}function ed(n,t){return((t==null?void 0:t.queryKeyHashFn)||Hi)(n)}function Hi(n){return JSON.stringify(n,(t,s)=>gc(s)?Object.keys(s).sort().reduce((i,a)=>(i[a]=s[a],i),{}):s)}function Wi(n,t){return n===t?!0:typeof n!=typeof t?!1:n&&t&&typeof n=="object"&&typeof t=="object"?Object.keys(t).every(s=>Wi(n[s],t[s])):!1}var ab=Object.prototype.hasOwnProperty;function ey(n,t,s=0){if(n===t)return n;if(s>500)return t;const i=Ip(n)&&Ip(t);if(!i&&!(gc(n)&&gc(t)))return t;const u=(i?n:Object.keys(n)).length,d=i?t:Object.keys(t),h=d.length,m=i?new Array(h):{};let g=0;for(let v=0;v{Mr.setTimeout(t,n)})}function yc(n,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,t):s.structuralSharing!==!1?ey(n,t):t}function ub(n,t,s=0){const i=[...n,t];return s&&i.length>s?i.slice(1):i}function cb(n,t,s=0){const i=[t,...n];return s&&i.length>s?i.slice(0,-1):i}var td=Symbol();function ty(n,t){return!n.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!n.queryFn||n.queryFn===td?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function ny(n,t){return typeof n=="function"?n(...t):!!n}function db(n,t,s){let i=!1,a;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(a??(a=t()),i||(i=!0,a.aborted?s():a.addEventListener("abort",s,{once:!0})),a)}),n}var Ur,cr,Ps,Wm,fb=(Wm=class extends Zi{constructor(){super();pe(this,Ur);pe(this,cr);pe(this,Ps);ee(this,Ps,t=>{if(!Zr&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){R(this,cr)||this.setEventListener(R(this,Ps))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,cr))==null||t.call(this),ee(this,cr,void 0))}setEventListener(t){var s;ee(this,Ps,t),(s=R(this,cr))==null||s.call(this),ee(this,cr,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){R(this,Ur)!==t&&(ee(this,Ur,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof R(this,Ur)=="boolean"?R(this,Ur):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ur=new WeakMap,cr=new WeakMap,Ps=new WeakMap,Wm),nd=new fb;function vc(){let n,t;const s=new Promise((a,u)=>{n=a,t=u});s.status="pending",s.catch(()=>{});function i(a){Object.assign(s,a),delete s.resolve,delete s.reject}return s.resolve=a=>{i({status:"fulfilled",value:a}),n(a)},s.reject=a=>{i({status:"rejected",reason:a}),t(a)},s}var hb=ib;function pb(){let n=[],t=0,s=h=>{h()},i=h=>{h()},a=hb;const u=h=>{t?n.push(h):a(()=>{s(h)})},d=()=>{const h=n;n=[],h.length&&a(()=>{i(()=>{h.forEach(m=>{s(m)})})})};return{batch:h=>{let m;t++;try{m=h()}finally{t--,t||d()}return m},batchCalls:h=>(...m)=>{u(()=>{h(...m)})},schedule:u,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{i=h},setScheduler:h=>{a=h}}}var dt=pb(),Os,dr,As,qm,mb=(qm=class extends Zi{constructor(){super();pe(this,Os,!0);pe(this,dr);pe(this,As);ee(this,As,t=>{if(!Zr&&window.addEventListener){const s=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",i)}}})}onSubscribe(){R(this,dr)||this.setEventListener(R(this,As))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,dr))==null||t.call(this),ee(this,dr,void 0))}setEventListener(t){var s;ee(this,As,t),(s=R(this,dr))==null||s.call(this),ee(this,dr,t(this.setOnline.bind(this)))}setOnline(t){R(this,Os)!==t&&(ee(this,Os,t),this.listeners.forEach(i=>{i(t)}))}isOnline(){return R(this,Os)}},Os=new WeakMap,dr=new WeakMap,As=new WeakMap,qm),za=new mb;function gb(n){return Math.min(1e3*2**n,3e4)}function ry(n){return(n??"online")==="online"?za.isOnline():!0}var wc=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function sy(n){let t=!1,s=0,i;const a=vc(),u=()=>a.status!=="pending",d=k=>{var x;if(!u()){const S=new wc(k);E(S),(x=n.onCancel)==null||x.call(n,S)}},h=()=>{t=!0},m=()=>{t=!1},g=()=>nd.isFocused()&&(n.networkMode==="always"||za.isOnline())&&n.canRun(),v=()=>ry(n.networkMode)&&n.canRun(),w=k=>{u()||(i==null||i(),a.resolve(k))},E=k=>{u()||(i==null||i(),a.reject(k))},A=()=>new Promise(k=>{var x;i=S=>{(u()||g())&&k(S)},(x=n.onPause)==null||x.call(n)}).then(()=>{var k;i=void 0,u()||(k=n.onContinue)==null||k.call(n)}),D=()=>{if(u())return;let k;const x=s===0?n.initialPromise:void 0;try{k=x??n.fn()}catch(S){k=Promise.reject(S)}Promise.resolve(k).then(w).catch(S=>{var $;if(u())return;const L=n.retry??(Zr?0:3),O=n.retryDelay??gb,j=typeof O=="function"?O(s,S):O,V=L===!0||typeof L=="number"&&sg()?void 0:A()).then(()=>{t?E(S):D()})})};return{promise:a,status:()=>a.status,cancel:d,continue:()=>(i==null||i(),a),cancelRetry:h,continueRetry:m,canStart:v,start:()=>(v()?D():A().then(D),a)}}var Br,Qm,iy=(Qm=class{constructor(){pe(this,Br)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pc(this.gcTime)&&ee(this,Br,Mr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Zr?1/0:300*1e3))}clearGcTimeout(){R(this,Br)&&(Mr.clearTimeout(R(this,Br)),ee(this,Br,void 0))}},Br=new WeakMap,Qm),$r,js,Kt,Vr,it,Qi,Hr,ln,jn,Km,yb=(Km=class extends iy{constructor(t){super();pe(this,ln);pe(this,$r);pe(this,js);pe(this,Kt);pe(this,Vr);pe(this,it);pe(this,Qi);pe(this,Hr);ee(this,Hr,!1),ee(this,Qi,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,Vr,t.client),ee(this,Kt,R(this,Vr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,$r,Fp(this.options)),this.state=t.state??R(this,$r),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=R(this,it))==null?void 0:t.promise}setOptions(t){if(this.options={...R(this,Qi),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=Fp(this.options);s.data!==void 0&&(this.setState(Mp(s.data,s.dataUpdatedAt)),ee(this,$r,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,Kt).remove(this)}setData(t,s){const i=yc(this.state.data,t,this.options);return Ne(this,ln,jn).call(this,{data:i,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),i}setState(t,s){Ne(this,ln,jn).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var i,a;const s=(i=R(this,it))==null?void 0:i.promise;return(a=R(this,it))==null||a.cancel(t),s?s.then(Ot).catch(Ot):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,$r))}isActive(){return this.observers.some(t=>Gt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===td||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>vr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Zg(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(i=>i.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=R(this,it))==null||s.continue()}onOnline(){var s;const t=this.observers.find(i=>i.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=R(this,it))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,Kt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(R(this,it)&&(R(this,Hr)?R(this,it).cancel({revert:!0}):R(this,it).cancelRetry()),this.scheduleGc()),R(this,Kt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ne(this,ln,jn).call(this,{type:"invalidate"})}async fetch(t,s){var m,g,v,w,E,A,D,k,x,S,L,O;if(this.state.fetchStatus!=="idle"&&((m=R(this,it))==null?void 0:m.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(R(this,it))return R(this,it).continueRetry(),R(this,it).promise}if(t&&this.setOptions(t),!this.options.queryFn){const j=this.observers.find(V=>V.options.queryFn);j&&this.setOptions(j.options)}const i=new AbortController,a=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(ee(this,Hr,!0),i.signal)})},u=()=>{const j=ty(this.options,s),$=(()=>{const G={client:R(this,Vr),queryKey:this.queryKey,meta:this.meta};return a(G),G})();return ee(this,Hr,!1),this.options.persister?this.options.persister(j,$,this):j($)},h=(()=>{const j={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:R(this,Vr),state:this.state,fetchFn:u};return a(j),j})();(g=this.options.behavior)==null||g.onFetch(h,this),ee(this,js,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=h.fetchOptions)==null?void 0:v.meta))&&Ne(this,ln,jn).call(this,{type:"fetch",meta:(w=h.fetchOptions)==null?void 0:w.meta}),ee(this,it,sy({initialPromise:s==null?void 0:s.initialPromise,fn:h.fetchFn,onCancel:j=>{j instanceof wc&&j.revert&&this.setState({...R(this,js),fetchStatus:"idle"}),i.abort()},onFail:(j,V)=>{Ne(this,ln,jn).call(this,{type:"failed",failureCount:j,error:V})},onPause:()=>{Ne(this,ln,jn).call(this,{type:"pause"})},onContinue:()=>{Ne(this,ln,jn).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const j=await R(this,it).start();if(j===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(j),(A=(E=R(this,Kt).config).onSuccess)==null||A.call(E,j,this),(k=(D=R(this,Kt).config).onSettled)==null||k.call(D,j,this.state.error,this),j}catch(j){if(j instanceof wc){if(j.silent)return R(this,it).promise;if(j.revert){if(this.state.data===void 0)throw j;return this.state.data}}throw Ne(this,ln,jn).call(this,{type:"error",error:j}),(S=(x=R(this,Kt).config).onError)==null||S.call(x,j,this),(O=(L=R(this,Kt).config).onSettled)==null||O.call(L,this.state.data,j,this),j}finally{this.scheduleGc()}}},$r=new WeakMap,js=new WeakMap,Kt=new WeakMap,Vr=new WeakMap,it=new WeakMap,Qi=new WeakMap,Hr=new WeakMap,ln=new WeakSet,jn=function(t){const s=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...oy(i.data,this.options),fetchMeta:t.meta??null};case"success":const a={...i,...Mp(t.data,t.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,js,t.manual?a:void 0),a;case"error":const u=t.error;return{...i,error:u,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=s(this.state),dt.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),R(this,Kt).notify({query:this,type:"updated",action:t})})},Km);function oy(n,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ry(t.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Mp(n,t){return{data:n,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Fp(n){const t=typeof n.initialData=="function"?n.initialData():n.initialData,s=t!==void 0,i=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Pt,Pe,Ki,_t,Wr,Ls,zn,fr,Gi,zs,Is,qr,Qr,hr,Ds,ze,Ii,xc,bc,Sc,_c,Ec,kc,Cc,ay,Gm,vb=(Gm=class extends Zi{constructor(t,s){super();pe(this,ze);pe(this,Pt);pe(this,Pe);pe(this,Ki);pe(this,_t);pe(this,Wr);pe(this,Ls);pe(this,zn);pe(this,fr);pe(this,Gi);pe(this,zs);pe(this,Is);pe(this,qr);pe(this,Qr);pe(this,hr);pe(this,Ds,new Set);this.options=s,ee(this,Pt,t),ee(this,fr,null),ee(this,zn,vc()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,Pe).addObserver(this),Up(R(this,Pe),this.options)?Ne(this,ze,Ii).call(this):this.updateResult(),Ne(this,ze,_c).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Rc(R(this,Pe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Rc(R(this,Pe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ne(this,ze,Ec).call(this),Ne(this,ze,kc).call(this),R(this,Pe).removeObserver(this)}setOptions(t){const s=this.options,i=R(this,Pe);if(this.options=R(this,Pt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Gt(this.options.enabled,R(this,Pe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ne(this,ze,Cc).call(this),R(this,Pe).setOptions(this.options),s._defaulted&&!mc(this.options,s)&&R(this,Pt).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,Pe),observer:this});const a=this.hasListeners();a&&Bp(R(this,Pe),i,this.options,s)&&Ne(this,ze,Ii).call(this),this.updateResult(),a&&(R(this,Pe)!==i||Gt(this.options.enabled,R(this,Pe))!==Gt(s.enabled,R(this,Pe))||vr(this.options.staleTime,R(this,Pe))!==vr(s.staleTime,R(this,Pe)))&&Ne(this,ze,xc).call(this);const u=Ne(this,ze,bc).call(this);a&&(R(this,Pe)!==i||Gt(this.options.enabled,R(this,Pe))!==Gt(s.enabled,R(this,Pe))||u!==R(this,hr))&&Ne(this,ze,Sc).call(this,u)}getOptimisticResult(t){const s=R(this,Pt).getQueryCache().build(R(this,Pt),t),i=this.createResult(s,t);return xb(this,i)&&(ee(this,_t,i),ee(this,Ls,this.options),ee(this,Wr,R(this,Pe).state)),i}getCurrentResult(){return R(this,_t)}trackResult(t,s){return new Proxy(t,{get:(i,a)=>(this.trackProp(a),s==null||s(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&R(this,zn).status==="pending"&&R(this,zn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,a))})}trackProp(t){R(this,Ds).add(t)}getCurrentQuery(){return R(this,Pe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=R(this,Pt).defaultQueryOptions(t),i=R(this,Pt).getQueryCache().build(R(this,Pt),s);return i.fetch().then(()=>this.createResult(i,s))}fetch(t){return Ne(this,ze,Ii).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,_t)))}createResult(t,s){var oe;const i=R(this,Pe),a=this.options,u=R(this,_t),d=R(this,Wr),h=R(this,Ls),g=t!==i?t.state:R(this,Ki),{state:v}=t;let w={...v},E=!1,A;if(s._optimisticResults){const ue=this.hasListeners(),be=!ue&&Up(t,s),Te=ue&&Bp(t,i,s,a);(be||Te)&&(w={...w,...oy(v.data,t.options)}),s._optimisticResults==="isRestoring"&&(w.fetchStatus="idle")}let{error:D,errorUpdatedAt:k,status:x}=w;A=w.data;let S=!1;if(s.placeholderData!==void 0&&A===void 0&&x==="pending"){let ue;u!=null&&u.isPlaceholderData&&s.placeholderData===(h==null?void 0:h.placeholderData)?(ue=u.data,S=!0):ue=typeof s.placeholderData=="function"?s.placeholderData((oe=R(this,Is))==null?void 0:oe.state.data,R(this,Is)):s.placeholderData,ue!==void 0&&(x="success",A=yc(u==null?void 0:u.data,ue,s),E=!0)}if(s.select&&A!==void 0&&!S)if(u&&A===(d==null?void 0:d.data)&&s.select===R(this,Gi))A=R(this,zs);else try{ee(this,Gi,s.select),A=s.select(A),A=yc(u==null?void 0:u.data,A,s),ee(this,zs,A),ee(this,fr,null)}catch(ue){ee(this,fr,ue)}R(this,fr)&&(D=R(this,fr),A=R(this,zs),k=Date.now(),x="error");const L=w.fetchStatus==="fetching",O=x==="pending",j=x==="error",V=O&&L,$=A!==void 0,B={status:x,fetchStatus:w.fetchStatus,isPending:O,isSuccess:x==="success",isError:j,isInitialLoading:V,isLoading:V,data:A,dataUpdatedAt:w.dataUpdatedAt,error:D,errorUpdatedAt:k,failureCount:w.fetchFailureCount,failureReason:w.fetchFailureReason,errorUpdateCount:w.errorUpdateCount,isFetched:w.dataUpdateCount>0||w.errorUpdateCount>0,isFetchedAfterMount:w.dataUpdateCount>g.dataUpdateCount||w.errorUpdateCount>g.errorUpdateCount,isFetching:L,isRefetching:L&&!O,isLoadingError:j&&!$,isPaused:w.fetchStatus==="paused",isPlaceholderData:E,isRefetchError:j&&$,isStale:rd(t,s),refetch:this.refetch,promise:R(this,zn),isEnabled:Gt(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const ue=B.data!==void 0,be=B.status==="error"&&!ue,Te=_e=>{be?_e.reject(B.error):ue&&_e.resolve(B.data)},xe=()=>{const _e=ee(this,zn,B.promise=vc());Te(_e)},J=R(this,zn);switch(J.status){case"pending":t.queryHash===i.queryHash&&Te(J);break;case"fulfilled":(be||B.data!==J.value)&&xe();break;case"rejected":(!be||B.error!==J.reason)&&xe();break}}return B}updateResult(){const t=R(this,_t),s=this.createResult(R(this,Pe),this.options);if(ee(this,Wr,R(this,Pe).state),ee(this,Ls,this.options),R(this,Wr).data!==void 0&&ee(this,Is,R(this,Pe)),mc(s,t))return;ee(this,_t,s);const i=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,u=typeof a=="function"?a():a;if(u==="all"||!u&&!R(this,Ds).size)return!0;const d=new Set(u??R(this,Ds));return this.options.throwOnError&&d.add("error"),Object.keys(R(this,_t)).some(h=>{const m=h;return R(this,_t)[m]!==t[m]&&d.has(m)})};Ne(this,ze,ay).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ne(this,ze,_c).call(this)}},Pt=new WeakMap,Pe=new WeakMap,Ki=new WeakMap,_t=new WeakMap,Wr=new WeakMap,Ls=new WeakMap,zn=new WeakMap,fr=new WeakMap,Gi=new WeakMap,zs=new WeakMap,Is=new WeakMap,qr=new WeakMap,Qr=new WeakMap,hr=new WeakMap,Ds=new WeakMap,ze=new WeakSet,Ii=function(t){Ne(this,ze,Cc).call(this);let s=R(this,Pe).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(Ot)),s},xc=function(){Ne(this,ze,Ec).call(this);const t=vr(this.options.staleTime,R(this,Pe));if(Zr||R(this,_t).isStale||!pc(t))return;const i=Zg(R(this,_t).dataUpdatedAt,t)+1;ee(this,qr,Mr.setTimeout(()=>{R(this,_t).isStale||this.updateResult()},i))},bc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,Pe)):this.options.refetchInterval)??!1},Sc=function(t){Ne(this,ze,kc).call(this),ee(this,hr,t),!(Zr||Gt(this.options.enabled,R(this,Pe))===!1||!pc(R(this,hr))||R(this,hr)===0)&&ee(this,Qr,Mr.setInterval(()=>{(this.options.refetchIntervalInBackground||nd.isFocused())&&Ne(this,ze,Ii).call(this)},R(this,hr)))},_c=function(){Ne(this,ze,xc).call(this),Ne(this,ze,Sc).call(this,Ne(this,ze,bc).call(this))},Ec=function(){R(this,qr)&&(Mr.clearTimeout(R(this,qr)),ee(this,qr,void 0))},kc=function(){R(this,Qr)&&(Mr.clearInterval(R(this,Qr)),ee(this,Qr,void 0))},Cc=function(){const t=R(this,Pt).getQueryCache().build(R(this,Pt),this.options);if(t===R(this,Pe))return;const s=R(this,Pe);ee(this,Pe,t),ee(this,Ki,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},ay=function(t){dt.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(R(this,_t))}),R(this,Pt).getQueryCache().notify({query:R(this,Pe),type:"observerResultsUpdated"})})},Gm);function wb(n,t){return Gt(t.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&t.retryOnMount===!1)}function Up(n,t){return wb(n,t)||n.state.data!==void 0&&Rc(n,t,t.refetchOnMount)}function Rc(n,t,s){if(Gt(t.enabled,n)!==!1&&vr(t.staleTime,n)!=="static"){const i=typeof s=="function"?s(n):s;return i==="always"||i!==!1&&rd(n,t)}return!1}function Bp(n,t,s,i){return(n!==t||Gt(i.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&rd(n,s)}function rd(n,t){return Gt(t.enabled,n)!==!1&&n.isStaleByTime(vr(t.staleTime,n))}function xb(n,t){return!mc(n.getCurrentResult(),t)}function $p(n){return{onFetch:(t,s)=>{var v,w,E,A,D;const i=t.options,a=(E=(w=(v=t.fetchOptions)==null?void 0:v.meta)==null?void 0:w.fetchMore)==null?void 0:E.direction,u=((A=t.state.data)==null?void 0:A.pages)||[],d=((D=t.state.data)==null?void 0:D.pageParams)||[];let h={pages:[],pageParams:[]},m=0;const g=async()=>{let k=!1;const x=O=>{db(O,()=>t.signal,()=>k=!0)},S=ty(t.options,t.fetchOptions),L=async(O,j,V)=>{if(k)return Promise.reject();if(j==null&&O.pages.length)return Promise.resolve(O);const G=(()=>{const be={client:t.client,queryKey:t.queryKey,pageParam:j,direction:V?"backward":"forward",meta:t.options.meta};return x(be),be})(),B=await S(G),{maxPages:oe}=t.options,ue=V?cb:ub;return{pages:ue(O.pages,B,oe),pageParams:ue(O.pageParams,j,oe)}};if(a&&u.length){const O=a==="backward",j=O?bb:Vp,V={pages:u,pageParams:d},$=j(i,V);h=await L(V,$,O)}else{const O=n??u.length;do{const j=m===0?d[0]??i.initialPageParam:Vp(i,h);if(m>0&&j==null)break;h=await L(h,j),m++}while(m{var k,x;return(x=(k=t.options).persister)==null?void 0:x.call(k,g,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=g}}}function Vp(n,{pages:t,pageParams:s}){const i=t.length-1;return t.length>0?n.getNextPageParam(t[i],t,s[i],s):void 0}function bb(n,{pages:t,pageParams:s}){var i;return t.length>0?(i=n.getPreviousPageParam)==null?void 0:i.call(n,t[0],t,s[0],s):void 0}var Yi,yn,vt,Kr,vn,lr,Ym,Sb=(Ym=class extends iy{constructor(t){super();pe(this,vn);pe(this,Yi);pe(this,yn);pe(this,vt);pe(this,Kr);ee(this,Yi,t.client),this.mutationId=t.mutationId,ee(this,vt,t.mutationCache),ee(this,yn,[]),this.state=t.state||_b(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,yn).includes(t)||(R(this,yn).push(t),this.clearGcTimeout(),R(this,vt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,yn,R(this,yn).filter(s=>s!==t)),this.scheduleGc(),R(this,vt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,yn).length||(this.state.status==="pending"?this.scheduleGc():R(this,vt).remove(this))}continue(){var t;return((t=R(this,Kr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var d,h,m,g,v,w,E,A,D,k,x,S,L,O,j,V,$,G;const s=()=>{Ne(this,vn,lr).call(this,{type:"continue"})},i={client:R(this,Yi),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,Kr,sy({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(B,oe)=>{Ne(this,vn,lr).call(this,{type:"failed",failureCount:B,error:oe})},onPause:()=>{Ne(this,vn,lr).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,vt).canRun(this)}));const a=this.state.status==="pending",u=!R(this,Kr).canStart();try{if(a)s();else{Ne(this,vn,lr).call(this,{type:"pending",variables:t,isPaused:u}),R(this,vt).config.onMutate&&await R(this,vt).config.onMutate(t,this,i);const oe=await((h=(d=this.options).onMutate)==null?void 0:h.call(d,t,i));oe!==this.state.context&&Ne(this,vn,lr).call(this,{type:"pending",context:oe,variables:t,isPaused:u})}const B=await R(this,Kr).start();return await((g=(m=R(this,vt).config).onSuccess)==null?void 0:g.call(m,B,t,this.state.context,this,i)),await((w=(v=this.options).onSuccess)==null?void 0:w.call(v,B,t,this.state.context,i)),await((A=(E=R(this,vt).config).onSettled)==null?void 0:A.call(E,B,null,this.state.variables,this.state.context,this,i)),await((k=(D=this.options).onSettled)==null?void 0:k.call(D,B,null,t,this.state.context,i)),Ne(this,vn,lr).call(this,{type:"success",data:B}),B}catch(B){try{await((S=(x=R(this,vt).config).onError)==null?void 0:S.call(x,B,t,this.state.context,this,i))}catch(oe){Promise.reject(oe)}try{await((O=(L=this.options).onError)==null?void 0:O.call(L,B,t,this.state.context,i))}catch(oe){Promise.reject(oe)}try{await((V=(j=R(this,vt).config).onSettled)==null?void 0:V.call(j,void 0,B,this.state.variables,this.state.context,this,i))}catch(oe){Promise.reject(oe)}try{await((G=($=this.options).onSettled)==null?void 0:G.call($,void 0,B,t,this.state.context,i))}catch(oe){Promise.reject(oe)}throw Ne(this,vn,lr).call(this,{type:"error",error:B}),B}finally{R(this,vt).runNext(this)}}},Yi=new WeakMap,yn=new WeakMap,vt=new WeakMap,Kr=new WeakMap,vn=new WeakSet,lr=function(t){const s=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),dt.batch(()=>{R(this,yn).forEach(i=>{i.onMutationUpdate(t)}),R(this,vt).notify({mutation:this,type:"updated",action:t})})},Ym);function _b(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var In,un,Xi,Xm,Eb=(Xm=class extends Zi{constructor(t={}){super();pe(this,In);pe(this,un);pe(this,Xi);this.config=t,ee(this,In,new Set),ee(this,un,new Map),ee(this,Xi,0)}build(t,s,i){const a=new Sb({client:t,mutationCache:this,mutationId:++pa(this,Xi)._,options:t.defaultMutationOptions(s),state:i});return this.add(a),a}add(t){R(this,In).add(t);const s=xa(t);if(typeof s=="string"){const i=R(this,un).get(s);i?i.push(t):R(this,un).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,In).delete(t)){const s=xa(t);if(typeof s=="string"){const i=R(this,un).get(s);if(i)if(i.length>1){const a=i.indexOf(t);a!==-1&&i.splice(a,1)}else i[0]===t&&R(this,un).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=xa(t);if(typeof s=="string"){const i=R(this,un).get(s),a=i==null?void 0:i.find(u=>u.state.status==="pending");return!a||a===t}else return!0}runNext(t){var i;const s=xa(t);if(typeof s=="string"){const a=(i=R(this,un).get(s))==null?void 0:i.find(u=>u!==t&&u.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){dt.batch(()=>{R(this,In).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,In).clear(),R(this,un).clear()})}getAll(){return Array.from(R(this,In))}find(t){const s={exact:!0,...t};return this.getAll().find(i=>zp(s,i))}findAll(t={}){return this.getAll().filter(s=>zp(t,s))}notify(t){dt.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return dt.batch(()=>Promise.all(t.map(s=>s.continue().catch(Ot))))}},In=new WeakMap,un=new WeakMap,Xi=new WeakMap,Xm);function xa(n){var t;return(t=n.options.scope)==null?void 0:t.id}var wn,Jm,kb=(Jm=class extends Zi{constructor(t={}){super();pe(this,wn);this.config=t,ee(this,wn,new Map)}build(t,s,i){const a=s.queryKey,u=s.queryHash??ed(a,s);let d=this.get(u);return d||(d=new yb({client:t,queryKey:a,queryHash:u,options:t.defaultQueryOptions(s),state:i,defaultOptions:t.getQueryDefaults(a)}),this.add(d)),d}add(t){R(this,wn).has(t.queryHash)||(R(this,wn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=R(this,wn).get(t.queryHash);s&&(t.destroy(),s===t&&R(this,wn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){dt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,wn).get(t)}getAll(){return[...R(this,wn).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(i=>Lp(s,i))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(i=>Lp(t,i)):s}notify(t){dt.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){dt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){dt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},wn=new WeakMap,Jm),We,pr,mr,Ms,Fs,gr,Us,Bs,Zm,Cb=(Zm=class{constructor(n={}){pe(this,We);pe(this,pr);pe(this,mr);pe(this,Ms);pe(this,Fs);pe(this,gr);pe(this,Us);pe(this,Bs);ee(this,We,n.queryCache||new kb),ee(this,pr,n.mutationCache||new Eb),ee(this,mr,n.defaultOptions||{}),ee(this,Ms,new Map),ee(this,Fs,new Map),ee(this,gr,0)}mount(){pa(this,gr)._++,R(this,gr)===1&&(ee(this,Us,nd.subscribe(async n=>{n&&(await this.resumePausedMutations(),R(this,We).onFocus())})),ee(this,Bs,za.subscribe(async n=>{n&&(await this.resumePausedMutations(),R(this,We).onOnline())})))}unmount(){var n,t;pa(this,gr)._--,R(this,gr)===0&&((n=R(this,Us))==null||n.call(this),ee(this,Us,void 0),(t=R(this,Bs))==null||t.call(this),ee(this,Bs,void 0))}isFetching(n){return R(this,We).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return R(this,pr).findAll({...n,status:"pending"}).length}getQueryData(n){var s;const t=this.defaultQueryOptions({queryKey:n});return(s=R(this,We).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(n){const t=this.defaultQueryOptions(n),s=R(this,We).build(this,t),i=s.state.data;return i===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(vr(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(n){return R(this,We).findAll(n).map(({queryKey:t,state:s})=>{const i=s.data;return[t,i]})}setQueryData(n,t,s){const i=this.defaultQueryOptions({queryKey:n}),a=R(this,We).get(i.queryHash),u=a==null?void 0:a.state.data,d=ob(t,u);if(d!==void 0)return R(this,We).build(this,i).setData(d,{...s,manual:!0})}setQueriesData(n,t,s){return dt.batch(()=>R(this,We).findAll(n).map(({queryKey:i})=>[i,this.setQueryData(i,t,s)]))}getQueryState(n){var s;const t=this.defaultQueryOptions({queryKey:n});return(s=R(this,We).get(t.queryHash))==null?void 0:s.state}removeQueries(n){const t=R(this,We);dt.batch(()=>{t.findAll(n).forEach(s=>{t.remove(s)})})}resetQueries(n,t){const s=R(this,We);return dt.batch(()=>(s.findAll(n).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...n},t)))}cancelQueries(n,t={}){const s={revert:!0,...t},i=dt.batch(()=>R(this,We).findAll(n).map(a=>a.cancel(s)));return Promise.all(i).then(Ot).catch(Ot)}invalidateQueries(n,t={}){return dt.batch(()=>(R(this,We).findAll(n).forEach(s=>{s.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},t)))}refetchQueries(n,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},i=dt.batch(()=>R(this,We).findAll(n).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let u=a.fetch(void 0,s);return s.throwOnError||(u=u.catch(Ot)),a.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(i).then(Ot)}fetchQuery(n){const t=this.defaultQueryOptions(n);t.retry===void 0&&(t.retry=!1);const s=R(this,We).build(this,t);return s.isStaleByTime(vr(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ot).catch(Ot)}fetchInfiniteQuery(n){return n.behavior=$p(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ot).catch(Ot)}ensureInfiniteQueryData(n){return n.behavior=$p(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return za.isOnline()?R(this,pr).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,We)}getMutationCache(){return R(this,pr)}getDefaultOptions(){return R(this,mr)}setDefaultOptions(n){ee(this,mr,n)}setQueryDefaults(n,t){R(this,Ms).set(Hi(n),{queryKey:n,defaultOptions:t})}getQueryDefaults(n){const t=[...R(this,Ms).values()],s={};return t.forEach(i=>{Wi(n,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(n,t){R(this,Fs).set(Hi(n),{mutationKey:n,defaultOptions:t})}getMutationDefaults(n){const t=[...R(this,Fs).values()],s={};return t.forEach(i=>{Wi(n,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const t={...R(this,mr).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return t.queryHash||(t.queryHash=ed(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===td&&(t.enabled=!1),t}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...R(this,mr).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){R(this,We).clear(),R(this,pr).clear()}},We=new WeakMap,pr=new WeakMap,mr=new WeakMap,Ms=new WeakMap,Fs=new WeakMap,gr=new WeakMap,Us=new WeakMap,Bs=new WeakMap,Zm),ly=_.createContext(void 0),Rb=n=>{const t=_.useContext(ly);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Tb=({client:n,children:t})=>(_.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),p.jsx(ly.Provider,{value:n,children:t})),uy=_.createContext(!1),Nb=()=>_.useContext(uy);uy.Provider;function Pb(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var Ob=_.createContext(Pb()),Ab=()=>_.useContext(Ob),jb=(n,t,s)=>{const i=s!=null&&s.state.error&&typeof n.throwOnError=="function"?ny(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||i)&&(t.isReset()||(n.retryOnMount=!1))},Lb=n=>{_.useEffect(()=>{n.clearReset()},[n])},zb=({result:n,errorResetBoundary:t,throwOnError:s,query:i,suspense:a})=>n.isError&&!t.isReset()&&!n.isFetching&&i&&(a&&n.data===void 0||ny(s,[n.error,i])),Ib=n=>{if(n.suspense){const s=a=>a==="static"?a:Math.max(a??1e3,1e3),i=n.staleTime;n.staleTime=typeof i=="function"?(...a)=>s(i(...a)):s(i),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},Db=(n,t)=>n.isLoading&&n.isFetching&&!t,Mb=(n,t)=>(n==null?void 0:n.suspense)&&t.isPending,Hp=(n,t,s)=>t.fetchOptimistic(n).catch(()=>{s.clearReset()});function Fb(n,t,s){var E,A,D,k;const i=Nb(),a=Ab(),u=Rb(),d=u.defaultQueryOptions(n);(A=(E=u.getDefaultOptions().queries)==null?void 0:E._experimental_beforeQuery)==null||A.call(E,d);const h=u.getQueryCache().get(d.queryHash);d._optimisticResults=i?"isRestoring":"optimistic",Ib(d),jb(d,a,h),Lb(a);const m=!u.getQueryCache().get(d.queryHash),[g]=_.useState(()=>new t(u,d)),v=g.getOptimisticResult(d),w=!i&&n.subscribed!==!1;if(_.useSyncExternalStore(_.useCallback(x=>{const S=w?g.subscribe(dt.batchCalls(x)):Ot;return g.updateResult(),S},[g,w]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),_.useEffect(()=>{g.setOptions(d)},[d,g]),Mb(d,v))throw Hp(d,g,a);if(zb({result:v,errorResetBoundary:a,throwOnError:d.throwOnError,query:h,suspense:d.suspense}))throw v.error;if((k=(D=u.getDefaultOptions().queries)==null?void 0:D._experimental_afterQuery)==null||k.call(D,d,v),d.experimental_prefetchInRender&&!Zr&&Db(v,i)){const x=m?Hp(d,g,a):h==null?void 0:h.promise;x==null||x.catch(Ot).finally(()=>{g.updateResult()})}return d.notifyOnChangeProps?v:g.trackResult(v)}function Ub(n,t){return Fb(n,vb)}const Bb=new Cb({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Ia(){return Ia=Object.assign?Object.assign.bind():function(n){for(var t=1;t"u")throw new Error(t)}function cy(n,t){if(!n){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Vb(){return Math.random().toString(36).substr(2,8)}function qp(n,t){return{usr:n.state,key:n.key,idx:t}}function Tc(n,t,s,i){return s===void 0&&(s=null),Ia({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof t=="string"?Va(t):t,{state:s,key:t&&t.key||i||Vb()})}function dy(n){let{pathname:t="/",search:s="",hash:i=""}=n;return s&&s!=="?"&&(t+=s.charAt(0)==="?"?s:"?"+s),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function Va(n){let t={};if(n){let s=n.indexOf("#");s>=0&&(t.hash=n.substr(s),n=n.substr(0,s));let i=n.indexOf("?");i>=0&&(t.search=n.substr(i),n=n.substr(0,i)),n&&(t.pathname=n)}return t}function Hb(n,t,s,i){i===void 0&&(i={});let{window:a=document.defaultView,v5Compat:u=!1}=i,d=a.history,h=yr.Pop,m=null,g=v();g==null&&(g=0,d.replaceState(Ia({},d.state,{idx:g}),""));function v(){return(d.state||{idx:null}).idx}function w(){h=yr.Pop;let x=v(),S=x==null?null:x-g;g=x,m&&m({action:h,location:k.location,delta:S})}function E(x,S){h=yr.Push;let L=Tc(k.location,x,S);g=v()+1;let O=qp(L,g),j=k.createHref(L);try{d.pushState(O,"",j)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;a.location.assign(j)}u&&m&&m({action:h,location:k.location,delta:1})}function A(x,S){h=yr.Replace;let L=Tc(k.location,x,S);g=v();let O=qp(L,g),j=k.createHref(L);d.replaceState(O,"",j),u&&m&&m({action:h,location:k.location,delta:0})}function D(x){let S=a.location.origin!=="null"?a.location.origin:a.location.href,L=typeof x=="string"?x:dy(x);return L=L.replace(/ $/,"%20"),jt(S,"No window.location.(origin|href) available to create URL for href: "+L),new URL(L,S)}let k={get action(){return h},get location(){return n(a,d)},listen(x){if(m)throw new Error("A history only accepts one active listener");return a.addEventListener(Wp,w),m=x,()=>{a.removeEventListener(Wp,w),m=null}},createHref(x){return t(a,x)},createURL:D,encodeLocation(x){let S=D(x);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:E,replace:A,go(x){return d.go(x)}};return k}var Qp;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(Qp||(Qp={}));function Wb(n,t,s){return s===void 0&&(s="/"),qb(n,t,s)}function qb(n,t,s,i){let a=typeof t=="string"?Va(t):t,u=py(a.pathname||"/",s);if(u==null)return null;let d=fy(n);Qb(d);let h=null,m=iS(u);for(let g=0;h==null&&g{let m={relativePath:h===void 0?u.path||"":h,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};m.relativePath.startsWith("/")&&(jt(m.relativePath.startsWith(i),'Absolute route path "'+m.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),m.relativePath=m.relativePath.slice(i.length));let g=Ns([i,m.relativePath]),v=s.concat(m);u.children&&u.children.length>0&&(jt(u.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),fy(u.children,t,v,g)),!(u.path==null&&!u.index)&&t.push({path:g,score:eS(g,u.index),routesMeta:v})};return n.forEach((u,d)=>{var h;if(u.path===""||!((h=u.path)!=null&&h.includes("?")))a(u,d);else for(let m of hy(u.path))a(u,d,m)}),t}function hy(n){let t=n.split("/");if(t.length===0)return[];let[s,...i]=t,a=s.endsWith("?"),u=s.replace(/\?$/,"");if(i.length===0)return a?[u,""]:[u];let d=hy(i.join("/")),h=[];return h.push(...d.map(m=>m===""?u:[u,m].join("/"))),a&&h.push(...d),h.map(m=>n.startsWith("/")&&m===""?"/":m)}function Qb(n){n.sort((t,s)=>t.score!==s.score?s.score-t.score:tS(t.routesMeta.map(i=>i.childrenIndex),s.routesMeta.map(i=>i.childrenIndex)))}const Kb=/^:[\w-]+$/,Gb=3,Yb=2,Xb=1,Jb=10,Zb=-2,Kp=n=>n==="*";function eS(n,t){let s=n.split("/"),i=s.length;return s.some(Kp)&&(i+=Zb),t&&(i+=Yb),s.filter(a=>!Kp(a)).reduce((a,u)=>a+(Kb.test(u)?Gb:u===""?Xb:Jb),i)}function tS(n,t){return n.length===t.length&&n.slice(0,-1).every((i,a)=>i===t[a])?n[n.length-1]-t[t.length-1]:0}function nS(n,t,s){let{routesMeta:i}=n,a={},u="/",d=[];for(let h=0;h{let{paramName:E,isOptional:A}=v;if(E==="*"){let k=h[w]||"";d=u.slice(0,u.length-k.length).replace(/(.)\/+$/,"$1")}const D=h[w];return A&&!D?g[E]=void 0:g[E]=(D||"").replace(/%2F/g,"/"),g},{}),pathname:u,pathnameBase:d,pattern:n}}function sS(n,t,s){t===void 0&&(t=!1),s===void 0&&(s=!0),cy(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let i=[],a="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,h,m)=>(i.push({paramName:h,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(i.push({paramName:"*"}),a+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?a+="\\/*$":n!==""&&n!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),i]}function iS(n){try{return n.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return cy(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),n}}function py(n,t){if(t==="/")return n;if(!n.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,i=n.charAt(s);return i&&i!=="/"?null:n.slice(s)||"/"}const oS=n=>n.replace(/\/\/+/g,"/"),Ns=n=>oS(n.join("/")),aS=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/");function lS(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const my=["post","put","patch","delete"];new Set(my);const uS=["get",...my];new Set(uS);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Da(){return Da=Object.assign?Object.assign.bind():function(n){for(var t=1;tObject.assign({},x,{params:Object.assign({},h,x.params),pathname:Ns([m,a.encodeLocation?a.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?m:Ns([m,a.encodeLocation?a.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),u,s,i);return t&&k?_.createElement(eo.Provider,{value:{location:Da({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:yr.Pop}},k):k}function mS(){let n=_S(),t=lS(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return _.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),s?_.createElement("pre",{style:a},s):null,null)}const gS=_.createElement(mS,null);class yS extends _.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,s){return s.location!==t.location||s.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:s.error,location:s.location,revalidation:t.revalidation||s.revalidation}}componentDidCatch(t,s){console.error("React Router caught the following error during render",t,s)}render(){return this.state.error!==void 0?_.createElement(Ha.Provider,{value:this.props.routeContext},_.createElement(yy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function vS(n){let{routeContext:t,match:s,children:i}=n,a=_.useContext(cS);return a&&a.static&&a.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=s.route.id),_.createElement(Ha.Provider,{value:t},i)}function wS(n,t,s,i){var a;if(t===void 0&&(t=[]),s===void 0&&(s=null),i===void 0&&(i=null),n==null){var u;if(!s)return null;if(s.errors)n=s.matches;else if((u=i)!=null&&u.v7_partialHydration&&t.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let d=n,h=(a=s)==null?void 0:a.errors;if(h!=null){let v=d.findIndex(w=>w.route.id&&(h==null?void 0:h[w.route.id])!==void 0);v>=0||jt(!1),d=d.slice(0,Math.min(d.length,v+1))}let m=!1,g=-1;if(s&&i&&i.v7_partialHydration)for(let v=0;v=0?d=d.slice(0,g+1):d=[d[0]];break}}}return d.reduceRight((v,w,E)=>{let A,D=!1,k=null,x=null;s&&(A=h&&w.route.id?h[w.route.id]:void 0,k=w.route.errorElement||gS,m&&(g<0&&E===0?(ES("route-fallback"),D=!0,x=null):g===E&&(D=!0,x=w.route.hydrateFallbackElement||null)));let S=t.concat(d.slice(0,E+1)),L=()=>{let O;return A?O=k:D?O=x:w.route.Component?O=_.createElement(w.route.Component,null):w.route.element?O=w.route.element:O=v,_.createElement(vS,{match:w,routeContext:{outlet:v,matches:S,isDataRoute:s!=null},children:O})};return s&&(w.route.ErrorBoundary||w.route.errorElement||E===0)?_.createElement(yS,{location:s.location,revalidation:s.revalidation,component:k,error:A,children:L(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):L()},null)}var vy=(function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n})(vy||{});function xS(n){let t=_.useContext(dS);return t||jt(!1),t}function bS(n){let t=_.useContext(Ha);return t||jt(!1),t}function SS(n){let t=bS(),s=t.matches[t.matches.length-1];return s.route.id||jt(!1),s.route.id}function _S(){var n;let t=_.useContext(yy),s=xS(vy.UseRouteError),i=SS();return t!==void 0?t:(n=s.errors)==null?void 0:n[i]}const Gp={};function ES(n,t,s){Gp[n]||(Gp[n]=!0)}function kS(n,t){n==null||n.v7_startTransition,n==null||n.v7_relativeSplatPath}function Nc(n){jt(!1)}function CS(n){let{basename:t="/",children:s=null,location:i,navigationType:a=yr.Pop,navigator:u,static:d=!1,future:h}=n;sd()&&jt(!1);let m=t.replace(/^\/*/,"/"),g=_.useMemo(()=>({basename:m,navigator:u,static:d,future:Da({v7_relativeSplatPath:!1},h)}),[m,h,u,d]);typeof i=="string"&&(i=Va(i));let{pathname:v="/",search:w="",hash:E="",state:A=null,key:D="default"}=i,k=_.useMemo(()=>{let x=py(v,m);return x==null?null:{location:{pathname:x,search:w,hash:E,state:A,key:D},navigationType:a}},[m,v,w,E,A,D,a]);return k==null?null:_.createElement(gy.Provider,{value:g},_.createElement(eo.Provider,{children:s,value:k}))}function RS(n){let{children:t,location:s}=n;return hS(Pc(t),s)}new Promise(()=>{});function Pc(n,t){t===void 0&&(t=[]);let s=[];return _.Children.forEach(n,(i,a)=>{if(!_.isValidElement(i))return;let u=[...t,a];if(i.type===_.Fragment){s.push.apply(s,Pc(i.props.children,u));return}i.type!==Nc&&jt(!1),!i.props.index||!i.props.children||jt(!1);let d={id:i.props.id||u.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(d.children=Pc(i.props.children,u)),s.push(d)}),s}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const TS="6";try{window.__reactRouterVersion=TS}catch{}const NS="startTransition",Yp=tg[NS];function PS(n){let{basename:t,children:s,future:i,window:a}=n,u=_.useRef();u.current==null&&(u.current=$b({window:a,v5Compat:!0}));let d=u.current,[h,m]=_.useState({action:d.action,location:d.location}),{v7_startTransition:g}=i||{},v=_.useCallback(w=>{g&&Yp?Yp(()=>m(w)):m(w)},[m,g]);return _.useLayoutEffect(()=>d.listen(v),[d,v]),_.useEffect(()=>kS(i),[i]),_.createElement(CS,{basename:t,children:s,location:h.location,navigationType:h.action,navigator:d,future:i})}var Xp;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(Xp||(Xp={}));var Jp;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(Jp||(Jp={}));function wy(n,t){return function(){return n.apply(t,arguments)}}const{toString:OS}=Object.prototype,{getPrototypeOf:$s}=Object,{iterator:to,toStringTag:xy}=Symbol,Ma=(({hasOwnProperty:n})=>(t,s)=>n.call(t,s))(Object.prototype),qi=(n,t)=>{let s=n;const i=[];for(;s!=null&&s!==Object.prototype;){if(i.indexOf(s)!==-1)return!1;if(i.push(s),Ma(s,t))return!0;s=$s(s)}return!1},AS=(n,t)=>n!=null&&qi(n,t)?n[t]:void 0,od=(n=>t=>{const s=OS.call(t);return n[s]||(n[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),dn=n=>(n=n.toLowerCase(),t=>od(t)===n),Wa=n=>t=>typeof t===n,{isArray:es}=Array,Vs=Wa("undefined");function Hs(n){return n!==null&&!Vs(n)&&n.constructor!==null&&!Vs(n.constructor)&&At(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const by=dn("ArrayBuffer");function jS(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&by(n.buffer),t}const LS=Wa("string"),At=Wa("function"),Sy=Wa("number"),Ws=n=>n!==null&&typeof n=="object",zS=n=>n===!0||n===!1,Ra=n=>{if(!Ws(n))return!1;const t=$s(n);return(t===null||t===Object.prototype||$s(t)===null)&&!qi(n,xy)&&!qi(n,to)},IS=n=>{if(!Ws(n)||Hs(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},DS=dn("Date"),MS=dn("File"),FS=n=>!!(n&&typeof n.uri<"u"),US=n=>n&&typeof n.getParts<"u",BS=dn("Blob"),$S=dn("FileList"),VS=n=>Ws(n)&&At(n.pipe);function HS(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Zp=HS(),em=typeof Zp.FormData<"u"?Zp.FormData:void 0,WS=n=>{if(!n)return!1;if(em&&n instanceof em)return!0;const t=$s(n);if(!t||t===Object.prototype||!At(n.append))return!1;const s=od(n);return s==="formdata"||s==="object"&&At(n.toString)&&n.toString()==="[object FormData]"},qS=dn("URLSearchParams"),[QS,KS,GS,YS]=["ReadableStream","Request","Response","Headers"].map(dn),XS=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function no(n,t,{allOwnKeys:s=!1}={}){if(n===null||typeof n>"u")return;let i,a;if(typeof n!="object"&&(n=[n]),es(n))for(i=0,a=n.length;i0;)if(a=s[i],t===a.toLowerCase())return a;return null}const Fr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ey=n=>!Vs(n)&&n!==Fr;function Oc(...n){const{caseless:t,skipUndefined:s}=Ey(this)&&this||{},i={},a=(u,d)=>{if(d==="__proto__"||d==="constructor"||d==="prototype")return;const h=t&&typeof d=="string"&&_y(i,d)||d,m=Ma(i,h)?i[h]:void 0;Ra(m)&&Ra(u)?i[h]=Oc(m,u):Ra(u)?i[h]=Oc({},u):es(u)?i[h]=u.slice():(!s||!Vs(u))&&(i[h]=u)};for(let u=0,d=n.length;u(no(t,(a,u)=>{s&&At(a)?Object.defineProperty(n,u,{__proto__:null,value:wy(a,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,u,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),n),ZS=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),e_=(n,t,s,i)=>{n.prototype=Object.create(t.prototype,i),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),s&&Object.assign(n.prototype,s)},t_=(n,t,s,i)=>{let a,u,d;const h={};if(t=t||{},n==null)return t;do{for(a=Object.getOwnPropertyNames(n),u=a.length;u-- >0;)d=a[u],(!i||i(d,n,t))&&!h[d]&&(t[d]=n[d],h[d]=!0);n=s!==!1&&$s(n)}while(n&&(!s||s(n,t))&&n!==Object.prototype);return t},n_=(n,t,s)=>{n=String(n),(s===void 0||s>n.length)&&(s=n.length),s-=t.length;const i=n.indexOf(t,s);return i!==-1&&i===s},r_=n=>{if(!n)return null;if(es(n))return n;let t=n.length;if(!Sy(t))return null;const s=new Array(t);for(;t-- >0;)s[t]=n[t];return s},s_=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&$s(Uint8Array)),i_=(n,t)=>{const i=(n&&n[to]).call(n);let a;for(;(a=i.next())&&!a.done;){const u=a.value;t.call(n,u[0],u[1])}},o_=(n,t)=>{let s;const i=[];for(;(s=n.exec(t))!==null;)i.push(s);return i},a_=dn("HTMLFormElement"),l_=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,i,a){return i.toUpperCase()+a}),{propertyIsEnumerable:u_}=Object.prototype,c_=dn("RegExp"),ky=(n,t)=>{const s=Object.getOwnPropertyDescriptors(n),i={};no(s,(a,u)=>{let d;(d=t(a,u,n))!==!1&&(i[u]=d||a)}),Object.defineProperties(n,i)},d_=n=>{ky(n,(t,s)=>{if(At(n)&&["arguments","caller","callee"].includes(s))return!1;const i=n[s];if(At(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},f_=(n,t)=>{const s={},i=a=>{a.forEach(u=>{s[u]=!0})};return es(n)?i(n):i(String(n).split(t)),s},h_=()=>{},p_=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function m_(n){return!!(n&&At(n.append)&&n[xy]==="FormData"&&n[to])}const g_=n=>{const t=new WeakSet,s=i=>{if(Ws(i)){if(t.has(i))return;if(Hs(i))return i;if(!("toJSON"in i)){t.add(i);const a=es(i)?[]:{};return no(i,(u,d)=>{const h=s(u);!Vs(h)&&(a[d]=h)}),t.delete(i),a}}return i};return s(n)},y_=dn("AsyncFunction"),v_=n=>n&&(Ws(n)||At(n))&&At(n.then)&&At(n.catch),Cy=((n,t)=>n?setImmediate:t?((s,i)=>(Fr.addEventListener("message",({source:a,data:u})=>{a===Fr&&u===s&&i.length&&i.shift()()},!1),a=>{i.push(a),Fr.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",At(Fr.postMessage)),w_=typeof queueMicrotask<"u"?queueMicrotask.bind(Fr):typeof process<"u"&&process.nextTick||Cy,Ry=n=>n!=null&&At(n[to]),x_=n=>n!=null&&qi(n,to)&&Ry(n),P={isArray:es,isArrayBuffer:by,isBuffer:Hs,isFormData:WS,isArrayBufferView:jS,isString:LS,isNumber:Sy,isBoolean:zS,isObject:Ws,isPlainObject:Ra,isEmptyObject:IS,isReadableStream:QS,isRequest:KS,isResponse:GS,isHeaders:YS,isUndefined:Vs,isDate:DS,isFile:MS,isReactNativeBlob:FS,isReactNative:US,isBlob:BS,isRegExp:c_,isFunction:At,isStream:VS,isURLSearchParams:qS,isTypedArray:s_,isFileList:$S,forEach:no,merge:Oc,extend:JS,trim:XS,stripBOM:ZS,inherits:e_,toFlatObject:t_,kindOf:od,kindOfTest:dn,endsWith:n_,toArray:r_,forEachEntry:i_,matchAll:o_,isHTMLForm:a_,hasOwnProperty:Ma,hasOwnProp:Ma,hasOwnInPrototypeChain:qi,getSafeProp:AS,reduceDescriptors:ky,freezeMethods:d_,toObjectSet:f_,toCamelCase:l_,noop:h_,toFiniteNumber:p_,findKey:_y,global:Fr,isContextDefined:Ey,isSpecCompliantForm:m_,toJSONObject:g_,isAsyncFn:y_,isThenable:v_,setImmediate:Cy,asap:w_,isIterable:Ry,isSafeIterable:x_},b_=P.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),S_=n=>{const t={};let s,i,a;return n&&n.split(` `).forEach(function(d){a=d.indexOf(":"),s=d.substring(0,a).trim().toLowerCase(),i=d.substring(a+1).trim(),!(!s||t[s]&&b_[s])&&(s==="set-cookie"?t[s]?t[s].push(i):t[s]=[i]:t[s]=t[s]?t[s]+", "+i:i)}),t};function __(n){let t=0,s=n.length;for(;tt;){const i=n.charCodeAt(s-1);if(i!==9&&i!==32)break;s-=1}return t===0&&s===n.length?n:n.slice(t,s)}const E_=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),k_=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ad(n,t){return P.isArray(n)?n.map(s=>ad(s,t)):__(String(n).replace(t,""))}const C_=n=>ad(n,E_),R_=n=>ad(n,k_);function Ty(n){const t=Object.create(null);return P.forEach(n.toJSON(),(s,i)=>{t[i]=R_(s)}),t}const tm=Symbol("internals");function ji(n){return n&&String(n).trim().toLowerCase()}function Ta(n){return n===!1||n==null?n:P.isArray(n)?n.map(Ta):C_(String(n))}function T_(n){const t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=s.exec(n);)t[i[1]]=i[2];return t}const N_=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Yu(n,t,s,i,a){if(P.isFunction(i))return i.call(this,t,s);if(a&&(t=s),!!P.isString(t)){if(P.isString(i))return t.indexOf(i)!==-1;if(P.isRegExp(i))return i.test(t)}}function P_(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,s,i)=>s.toUpperCase()+i)}function O_(n,t){const s=P.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+s,{__proto__:null,value:function(a,u,d){return this[i].call(this,t,a,u,d)},configurable:!0})})}let wt=class{constructor(t){t&&this.set(t)}set(t,s,i){const a=this;function u(h,m,g){const v=ji(m);if(!v)return;const w=P.findKey(a,v);(!w||a[w]===void 0||g===!0||g===void 0&&a[w]!==!1)&&(a[w||m]=Ta(h))}const d=(h,m)=>P.forEach(h,(g,v)=>u(g,v,m));if(P.isPlainObject(t)||t instanceof this.constructor)d(t,s);else if(P.isString(t)&&(t=t.trim())&&!N_(t))d(S_(t),s);else if(P.isObject(t)&&P.isSafeIterable(t)){let h=Object.create(null),m,g;for(const v of t){if(!P.isArray(v))throw new TypeError("Object iterator must return a key-value pair");g=v[0],P.hasOwnProp(h,g)?(m=h[g],h[g]=P.isArray(m)?[...m,v[1]]:[m,v[1]]):h[g]=v[1]}d(h,s)}else t!=null&&u(s,t,i);return this}get(t,s){if(t=ji(t),t){const i=P.findKey(this,t);if(i){const a=this[i];if(!s)return a;if(s===!0)return T_(a);if(P.isFunction(s))return s.call(this,a,i);if(P.isRegExp(s))return s.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,s){if(t=ji(t),t){const i=P.findKey(this,t);return!!(i&&this[i]!==void 0&&(!s||Yu(this,this[i],i,s)))}return!1}delete(t,s){const i=this;let a=!1;function u(d){if(d=ji(d),d){const h=P.findKey(i,d);h&&(!s||Yu(i,i[h],h,s))&&(delete i[h],a=!0)}}return P.isArray(t)?t.forEach(u):u(t),a}clear(t){const s=Object.keys(this);let i=s.length,a=!1;for(;i--;){const u=s[i];(!t||Yu(this,this[u],u,t,!0))&&(delete this[u],a=!0)}return a}normalize(t){const s=this,i={};return P.forEach(this,(a,u)=>{const d=P.findKey(i,u);if(d){s[d]=Ta(a),delete s[u];return}const h=t?P_(u):String(u).trim();h!==u&&delete s[u],s[h]=Ta(a),i[h]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const s=Object.create(null);return P.forEach(this,(i,a)=>{i!=null&&i!==!1&&(s[a]=t&&P.isArray(i)?i.join(", "):i)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,s])=>t+": "+s).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...s){const i=new this(t);return s.forEach(a=>i.set(a)),i}static accessor(t){const i=(this[tm]=this[tm]={accessors:{}}).accessors,a=this.prototype;function u(d){const h=ji(d);i[h]||(O_(a,d),i[h]=!0)}return P.isArray(t)?t.forEach(u):u(t),this}};wt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);P.reduceDescriptors(wt.prototype,({value:n},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(i){this[s]=i}}});P.freezeMethods(wt);const A_="[REDACTED ****]";function j_(n){if(P.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(P.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function L_(n,t){const s=new Set(t.map(u=>String(u).toLowerCase())),i=[],a=u=>{if(u===null||typeof u!="object"||P.isBuffer(u))return u;if(i.indexOf(u)!==-1)return;u instanceof wt&&(u=u.toJSON()),i.push(u);let d;if(P.isArray(u))d=[],u.forEach((h,m)=>{const g=a(h);P.isUndefined(g)||(d[m]=g)});else{if(!P.isPlainObject(u)&&j_(u))return i.pop(),u;d=Object.create(null);for(const[h,m]of Object.entries(u)){const g=s.has(h.toLowerCase())?A_:a(m);P.isUndefined(g)||(d[h]=g)}}return i.pop(),d};return a(n)}let X=class Ny extends Error{static from(t,s,i,a,u,d){const h=new Ny(t.message,s||t.code,i,a,u);return Object.defineProperty(h,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),h.name=t.name,t.status!=null&&h.status==null&&(h.status=t.status),d&&Object.assign(h,d),h}constructor(t,s,i,a,u){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),i&&(this.config=i),a&&(this.request=a),u&&(this.response=u,this.status=u.status)}toJSON(){const t=this.config,s=t&&P.hasOwnProp(t,"redact")?t.redact:void 0,i=P.isArray(s)&&s.length>0?L_(t,s):P.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:i,code:this.code,status:this.status}}};X.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";X.ERR_BAD_OPTION="ERR_BAD_OPTION";X.ECONNABORTED="ECONNABORTED";X.ETIMEDOUT="ETIMEDOUT";X.ECONNREFUSED="ECONNREFUSED";X.ERR_NETWORK="ERR_NETWORK";X.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";X.ERR_DEPRECATED="ERR_DEPRECATED";X.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";X.ERR_BAD_REQUEST="ERR_BAD_REQUEST";X.ERR_CANCELED="ERR_CANCELED";X.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";X.ERR_INVALID_URL="ERR_INVALID_URL";X.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const z_=null,Py=100;function Ac(n){return P.isPlainObject(n)||P.isArray(n)}function Oy(n){return P.endsWith(n,"[]")?n.slice(0,-2):n}function Xu(n,t,s){return n?n.concat(t).map(function(a,u){return a=Oy(a),!s&&u?"["+a+"]":a}).join(s?".":""):t}function I_(n){return P.isArray(n)&&!n.some(Ac)}const D_=P.toFlatObject(P,{},null,function(t){return/^is[A-Z]/.test(t)});function qa(n,t,s){if(!P.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,s=P.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(L,O){return!P.isUndefined(O[L])});const i=s.metaTokens,a=s.visitor||D,u=s.dots,d=s.indexes,h=s.Blob||typeof Blob<"u"&&Blob,m=s.maxDepth===void 0?Py:s.maxDepth,g=h&&P.isSpecCompliantForm(t),v=[];if(!P.isFunction(a))throw new TypeError("visitor must be a function");function w(S){if(S===null)return"";if(P.isDate(S))return S.toISOString();if(P.isBoolean(S))return S.toString();if(!g&&P.isBlob(S))throw new X("Blob is not supported. Use a Buffer instead.");if(P.isArrayBuffer(S)||P.isTypedArray(S)){if(g&&typeof h=="function")return new h([S]);if(typeof Buffer<"u")return Buffer.from(S);throw new X("Blob is not supported. Use a Buffer instead.",X.ERR_NOT_SUPPORT)}return S}function E(S){if(S>m)throw new X("Object is too deeply nested ("+S+" levels). Max depth: "+m,X.ERR_FORM_DATA_DEPTH_EXCEEDED)}function A(S,L){if(m===1/0)return JSON.stringify(S);const O=[];return JSON.stringify(S,function(V,$){if(!P.isObject($))return $;for(;O.length&&O[O.length-1]!==this;)O.pop();return O.push($),E(L+O.length-1),$})}function D(S,L,O){let j=S;if(P.isReactNative(t)&&P.isReactNativeBlob(S))return t.append(Xu(O,L,u),w(S)),!1;if(S&&!O&&typeof S=="object"){if(P.endsWith(L,"{}"))L=i?L:L.slice(0,-2),S=A(S,1);else if(P.isArray(S)&&I_(S)||(P.isFileList(S)||P.endsWith(L,"[]"))&&(j=P.toArray(S)))return L=Oy(L),j.forEach(function($,G){!(P.isUndefined($)||$===null)&&t.append(d===!0?Xu([L],G,u):d===null?L:L+"[]",w($))}),!1}return Ac(S)?!0:(t.append(Xu(O,L,u),w(S)),!1)}const k=Object.assign(D_,{defaultVisitor:D,convertValue:w,isVisitable:Ac});function x(S,L,O=0){if(!P.isUndefined(S)){if(E(O),v.indexOf(S)!==-1)throw new Error("Circular reference detected in "+L.join("."));v.push(S),P.forEach(S,function(V,$){(!(P.isUndefined(V)||V===null)&&a.call(t,V,P.isString($)?$.trim():$,L,k))===!0&&x(V,L?L.concat($):[$],O+1)}),v.pop()}}if(!P.isObject(n))throw new TypeError("data must be an object");return x(n),t}function nm(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(i){return t[i]})}function ld(n,t){this._pairs=[],n&&qa(n,this,t)}const Ay=ld.prototype;Ay.append=function(t,s){this._pairs.push([t,s])};Ay.toString=function(t){const s=t?i=>t.call(this,i,nm):nm;return this._pairs.map(function(a){return s(a[0])+"="+s(a[1])},"").join("&")};function M_(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function jy(n,t,s){if(!t)return n;n=n||"";const i=P.isFunction(s)?{serialize:s}:s,a=P.getSafeProp(i,"encode")||M_,u=P.getSafeProp(i,"serialize");let d;if(u?d=u(t,i):d=P.isURLSearchParams(t)?t.toString():new ld(t,i).toString(a),d){const h=n.indexOf("#");h!==-1&&(n=n.slice(0,h)),n+=(n.indexOf("?")===-1?"?":"&")+d}return n}class rm{constructor(){this.handlers=[]}use(t,s,i){return this.handlers.push({fulfilled:t,rejected:s,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){P.forEach(this.handlers,function(i){i!==null&&t(i)})}}const ud={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},F_=typeof URLSearchParams<"u"?URLSearchParams:ld,U_=typeof FormData<"u"?FormData:null,B_=typeof Blob<"u"?Blob:null,$_={isBrowser:!0,classes:{URLSearchParams:F_,FormData:U_,Blob:B_},protocols:["http","https","file","blob","url","data"]},cd=typeof window<"u"&&typeof document<"u",jc=typeof navigator=="object"&&navigator||void 0,V_=cd&&(!jc||["ReactNative","NativeScript","NS"].indexOf(jc.product)<0),H_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",W_=cd&&window.location.href||"http://localhost",q_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:cd,hasStandardBrowserEnv:V_,hasStandardBrowserWebWorkerEnv:H_,navigator:jc,origin:W_},Symbol.toStringTag,{value:"Module"})),ft={...q_,...$_};function Q_(n,t){return qa(n,new ft.classes.URLSearchParams,{visitor:function(s,i,a,u){return ft.isNode&&P.isBuffer(s)?(this.append(i,s.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...t})}const sm=Py;function Ly(n){if(n>sm)throw new X("FormData field is too deeply nested ("+n+" levels). Max depth: "+sm,X.ERR_FORM_DATA_DEPTH_EXCEEDED)}function K_(n){const t=[],s=/\w+|\[(\w*)]/g;let i;for(;(i=s.exec(n))!==null;)Ly(t.length),t.push(i[0]==="[]"?"":i[1]||i[0]);return t}function G_(n){const t={},s=Object.keys(n);let i;const a=s.length;let u;for(i=0;i=s.length;return d=!d&&P.isArray(a)?a.length:d,m?(P.hasOwnProp(a,d)?a[d]=P.isArray(a[d])?a[d].concat(i):[a[d],i]:a[d]=i,!h):((!P.hasOwnProp(a,d)||!P.isObject(a[d]))&&(a[d]=[]),t(s,i,a[d],u)&&P.isArray(a[d])&&(a[d]=G_(a[d])),!h)}if(P.isFormData(n)&&P.isFunction(n.entries)){const s={};return P.forEachEntry(n,(i,a)=>{t(K_(i),a,s,0)}),s}return null}const Rs=(n,t)=>n!=null&&P.hasOwnProp(n,t)?n[t]:void 0;function Y_(n,t,s){if(P.isString(n))try{return(t||JSON.parse)(n),P.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(s||JSON.stringify)(n)}const ro={transitional:ud,adapter:["xhr","http","fetch"],transformRequest:[function(t,s){const i=s.getContentType()||"",a=i.indexOf("application/json")>-1,u=P.isObject(t);if(u&&P.isHTMLForm(t)&&(t=new FormData(t)),P.isFormData(t))return a?JSON.stringify(zy(t)):t;if(P.isArrayBuffer(t)||P.isBuffer(t)||P.isStream(t)||P.isFile(t)||P.isBlob(t)||P.isReadableStream(t))return t;if(P.isArrayBufferView(t))return t.buffer;if(P.isURLSearchParams(t))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let h;if(u){const m=Rs(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return Q_(t,m).toString();if((h=P.isFileList(t))||i.indexOf("multipart/form-data")>-1){const g=Rs(this,"env"),v=g&&g.FormData;return qa(h?{"files[]":t}:t,v&&new v,m)}}return u||a?(s.setContentType("application/json",!1),Y_(t)):t}],transformResponse:[function(t){const s=Rs(this,"transitional")||ro.transitional,i=s&&s.forcedJSONParsing,a=Rs(this,"responseType"),u=a==="json";if(P.isResponse(t)||P.isReadableStream(t))return t;if(t&&P.isString(t)&&(i&&!a||u)){const h=!(s&&s.silentJSONParsing)&&u;try{return JSON.parse(t,Rs(this,"parseReviver"))}catch(m){if(h)throw m.name==="SyntaxError"?X.from(m,X.ERR_BAD_RESPONSE,this,null,Rs(this,"response")):m}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ft.classes.FormData,Blob:ft.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};P.forEach(["delete","get","head","post","put","patch","query"],n=>{ro.headers[n]={}});function Ju(n,t){const s=this||ro,i=t||s,a=wt.from(i.headers);let u=i.data;return P.forEach(n,function(h){u=h.call(s,u,a.normalize(),t?t.status:void 0)}),a.normalize(),u}function Iy(n){return!!(n&&n.__CANCEL__)}let so=class extends X{constructor(t,s,i){super(t??"canceled",X.ERR_CANCELED,s,i),this.name="CanceledError",this.__CANCEL__=!0}};function Dy(n,t,s){const i=s.config.validateStatus;!s.status||!i||i(s.status)?n(s):t(new X("Request failed with status code "+s.status,s.status>=400&&s.status<500?X.ERR_BAD_REQUEST:X.ERR_BAD_RESPONSE,s.config,s.request,s))}function X_(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function J_(n,t){n=n||10;const s=new Array(n),i=new Array(n);let a=0,u=0,d;return t=t!==void 0?t:1e3,function(m){const g=Date.now(),v=i[u];d||(d=g),s[a]=m,i[a]=g;let w=u,E=0;for(;w!==a;)E+=s[w++],w=w%n;if(a=(a+1)%n,a===u&&(u=(u+1)%n),g-d{s=v,a=null,u&&(clearTimeout(u),u=null),n(...g)};return[(...g)=>{const v=Date.now(),w=v-s;w>=i?d(g,v):(a=g,u||(u=setTimeout(()=>{u=null,d(a)},i-w)))},()=>a&&d(a)]}const Fa=(n,t,s=3)=>{let i=0;const a=J_(50,250);return Z_(u=>{if(!u||typeof u.loaded!="number")return;const d=u.loaded,h=u.lengthComputable?u.total:void 0,m=h!=null?Math.min(d,h):d,g=Math.max(0,m-i),v=a(g);i=Math.max(i,m);const w={loaded:m,total:h,progress:h?m/h:void 0,bytes:g,rate:v||void 0,estimated:v&&h?(h-m)/v:void 0,event:u,lengthComputable:h!=null,[t?"download":"upload"]:!0};n(w)},s)},im=(n,t)=>{const s=n!=null;return[i=>t[0]({lengthComputable:s,total:n,loaded:i}),t[1]]},om=n=>(...t)=>P.asap(()=>n(...t)),eE=ft.hasStandardBrowserEnv?((n,t)=>s=>(s=new URL(s,ft.origin),n.protocol===s.protocol&&n.host===s.host&&(t||n.port===s.port)))(new URL(ft.origin),ft.navigator&&/(msie|trident)/i.test(ft.navigator.userAgent)):()=>!0,tE=ft.hasStandardBrowserEnv?{write(n,t,s,i,a,u,d){if(typeof document>"u")return;const h=[`${n}=${encodeURIComponent(t)}`];P.isNumber(s)&&h.push(`expires=${new Date(s).toUTCString()}`),P.isString(i)&&h.push(`path=${i}`),P.isString(a)&&h.push(`domain=${a}`),u===!0&&h.push("secure"),P.isString(d)&&h.push(`SameSite=${d}`),document.cookie=h.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let s=0;sn instanceof wt?{...n}:n;function ts(n,t){n=n||{},t=t||{};const s=Object.create(null);Object.defineProperty(s,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function i(v,w,E,A){return P.isPlainObject(v)&&P.isPlainObject(w)?P.merge.call({caseless:A},v,w):P.isPlainObject(w)?P.merge({},w):P.isArray(w)?w.slice():w}function a(v,w,E,A){if(P.isUndefined(w)){if(!P.isUndefined(v))return i(void 0,v,E,A)}else return i(v,w,E,A)}function u(v,w){if(!P.isUndefined(w))return i(void 0,w)}function d(v,w){if(P.isUndefined(w)){if(!P.isUndefined(v))return i(void 0,v)}else return i(void 0,w)}function h(v){const w=P.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!P.isUndefined(w))if(P.isPlainObject(w)){if(P.hasOwnProp(w,v))return w[v]}else return;const E=P.hasOwnProp(n,"transitional")?n.transitional:void 0;if(P.isPlainObject(E)&&P.hasOwnProp(E,v))return E[v]}function m(v,w,E){if(P.hasOwnProp(t,E))return i(v,w);if(P.hasOwnProp(n,E))return i(void 0,v)}const g={url:u,method:u,data:u,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,allowedSocketPaths:d,responseEncoding:d,validateStatus:m,headers:(v,w,E)=>a(lm(v),lm(w),E,!0)};return P.forEach(Object.keys({...n,...t}),function(w){if(w==="__proto__"||w==="constructor"||w==="prototype")return;const E=P.hasOwnProp(g,w)?g[w]:a,A=P.hasOwnProp(n,w)?n[w]:void 0,D=P.hasOwnProp(t,w)?t[w]:void 0,k=E(A,D,w);P.isUndefined(k)&&E!==m||(s[w]=k)}),P.hasOwnProp(t,"validateStatus")&&P.isUndefined(t.validateStatus)&&h("validateStatusUndefinedResolves")===!1&&(P.hasOwnProp(n,"validateStatus")?s.validateStatus=i(void 0,n.validateStatus):delete s.validateStatus),s}const lE=["content-type","content-length"];function uE(n,t,s){if(s!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([i,a])=>{lE.includes(i.toLowerCase())&&n.set(i,a)})}const cE=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16)));function Fy(n){const t=ts({},n),s=E=>P.hasOwnProp(t,E)?t[E]:void 0,i=s("data");let a=s("withXSRFToken");const u=s("xsrfHeaderName"),d=s("xsrfCookieName");let h=s("headers");const m=s("auth"),g=s("baseURL"),v=s("allowAbsoluteUrls"),w=s("url");if(t.headers=h=wt.from(h),t.url=jy(My(g,w,v,t),s("params"),s("paramsSerializer")),m){const E=P.getSafeProp(m,"username")||"",A=P.getSafeProp(m,"password")||"";try{h.set("Authorization","Basic "+btoa(E+":"+(A?cE(A):"")))}catch(D){throw X.from(D,X.ERR_BAD_OPTION_VALUE,n)}}if(P.isFormData(i)&&(ft.hasStandardBrowserEnv||ft.hasStandardBrowserWebWorkerEnv||P.isReactNative(i)?h.setContentType(void 0):P.isFunction(i.getHeaders)&&uE(h,i.getHeaders(),s("formDataHeaderPolicy"))),ft.hasStandardBrowserEnv&&(P.isFunction(a)&&(a=a(t)),a===!0||a==null&&eE(t.url))){const A=u&&d&&tE.read(d);A&&h.set(u,A)}return t}const dE=typeof XMLHttpRequest<"u",fE=dE&&function(n){return new Promise(function(s,i){const a=Fy(n);let u=a.data;const d=wt.from(a.headers).normalize();let{responseType:h,onUploadProgress:m,onDownloadProgress:g}=a,v,w,E,A,D;function k(){A&&A(),D&&D(),a.cancelToken&&a.cancelToken.unsubscribe(v),a.signal&&a.signal.removeEventListener("abort",v)}let x=new XMLHttpRequest;x.open(a.method.toUpperCase(),a.url,!0),x.timeout=a.timeout;function S(){if(!x)return;const O=wt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),V={data:!h||h==="text"||h==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:O,config:n,request:x};Dy(function(G){s(G),k()},function(G){i(G),k()},V),x=null}"onloadend"in x?x.onloadend=S:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(S)},x.onabort=function(){x&&(i(new X("Request aborted",X.ECONNABORTED,n,x)),k(),x=null)},x.onerror=function(j){const V=j&&j.message?j.message:"Network Error",$=new X(V,X.ERR_NETWORK,n,x);$.event=j||null,i($),k(),x=null},x.ontimeout=function(){let j=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const V=a.transitional||ud;a.timeoutErrorMessage&&(j=a.timeoutErrorMessage),i(new X(j,V.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,n,x)),k(),x=null},u===void 0&&d.setContentType(null),"setRequestHeader"in x&&P.forEach(Ty(d),function(j,V){x.setRequestHeader(V,j)}),P.isUndefined(a.withCredentials)||(x.withCredentials=!!a.withCredentials),h&&h!=="json"&&(x.responseType=a.responseType),g&&([E,D]=Fa(g,!0),x.addEventListener("progress",E)),m&&x.upload&&([w,A]=Fa(m),x.upload.addEventListener("progress",w),x.upload.addEventListener("loadend",A)),(a.cancelToken||a.signal)&&(v=O=>{x&&(i(!O||O.type?new so(null,n,x):O),x.abort(),k(),x=null)},a.cancelToken&&a.cancelToken.subscribe(v),a.signal&&(a.signal.aborted?v():a.signal.addEventListener("abort",v)));const L=X_(a.url);if(L&&!ft.protocols.includes(L)){i(new X("Unsupported protocol "+L+":",X.ERR_BAD_REQUEST,n)),k();return}x.send(u||null)})},hE=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const s=new AbortController;let i=!1;const a=function(m){if(!i){i=!0,d();const g=m instanceof Error?m:this.reason;s.abort(g instanceof X?g:new so(g instanceof Error?g.message:g))}};let u=t&&setTimeout(()=>{u=null,a(new X(`timeout of ${t}ms exceeded`,X.ETIMEDOUT))},t);const d=()=>{n&&(u&&clearTimeout(u),u=null,n.forEach(m=>{m.unsubscribe?m.unsubscribe(a):m.removeEventListener("abort",a)}),n=null)};n.forEach(m=>m.addEventListener("abort",a,{once:!0}));const{signal:h}=s;return h.unsubscribe=()=>P.asap(d),h},pE=function*(n,t){let s=n.byteLength;if(s{const a=mE(n,t);let u=0,d,h=m=>{d||(d=!0,i&&i(m))};return new ReadableStream({async pull(m){try{const{done:g,value:v}=await a.next();if(g){h(),m.close();return}let w=v.byteLength;if(s){let E=u+=w;s(E)}m.enqueue(new Uint8Array(v))}catch(g){throw h(g),g}},cancel(m){return h(m),a.return()}},{highWaterMark:2})},Ua=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,yE=(n,t,s)=>t+2A>=2&&i.charCodeAt(A-2)===37&&i.charCodeAt(A-1)===51&&(i.charCodeAt(A)===68||i.charCodeAt(A)===100);g>=0&&(i.charCodeAt(g)===61?(m++,g--):v(g)&&(m++,g-=3)),m===1&&g>=0&&(i.charCodeAt(g)===61||v(g))&&m++;const E=Math.floor(d/4)*3-(m||0);return E>0?E:0}let u=0;for(let d=0,h=i.length;d=55296&&m<=56319&&d+1=56320&&g<=57343?(u+=4,d++):u+=3}else u+=3}return u}const dd="1.18.1",cm=64*1024,{isFunction:ba}=P,wE=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16))),dm=n=>{if(!P.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},fm=(n,...t)=>{try{return!!n(...t)}catch{return!1}},xE=n=>{const t=n.indexOf("://");let s=n;return t!==-1&&(s=s.slice(t+3)),s.includes("@")||s.includes(":")},bE=n=>{const t=P.global!==void 0&&P.global!==null?P.global:globalThis,{ReadableStream:s,TextEncoder:i}=t;n=P.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:a,Request:u,Response:d}=n,h=a?ba(a):typeof fetch=="function",m=ba(u),g=ba(d);if(!h)return!1;const v=h&&ba(s),w=h&&(typeof i=="function"?(S=>L=>S.encode(L))(new i):async S=>new Uint8Array(await new u(S).arrayBuffer())),E=m&&v&&fm(()=>{let S=!1;const L=new u(ft.origin,{body:new s,method:"POST",get duplex(){return S=!0,"half"}}),O=L.headers.has("Content-Type");return L.body!=null&&L.body.cancel(),S&&!O}),A=g&&v&&fm(()=>P.isReadableStream(new d("").body)),D={stream:A&&(S=>S.body)};h&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!D[S]&&(D[S]=(L,O)=>{let j=L&&L[S];if(j)return j.call(L);throw new X(`Response type '${S}' is not supported`,X.ERR_NOT_SUPPORT,O)})});const k=async S=>{if(S==null)return 0;if(P.isBlob(S))return S.size;if(P.isSpecCompliantForm(S))return(await new u(ft.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(P.isArrayBufferView(S)||P.isArrayBuffer(S))return S.byteLength;if(P.isURLSearchParams(S)&&(S=S+""),P.isString(S))return(await w(S)).byteLength},x=async(S,L)=>{const O=P.toFiniteNumber(S.getContentLength());return O??k(L)};return async S=>{let{url:L,method:O,data:j,signal:V,cancelToken:$,timeout:G,onDownloadProgress:B,onUploadProgress:oe,responseType:ue,headers:be,withCredentials:Te="same-origin",fetchOptions:xe,maxContentLength:J,maxBodyLength:_e}=Fy(S);const Se=P.isNumber(J)&&J>-1,Ee=P.isNumber(_e)&&_e>-1,K=Y=>P.hasOwnProp(S,Y)?S[Y]:void 0;let ae=a||fetch;ue=ue?(ue+"").toLowerCase():"text";let F=hE([V,$&&$.toAbortSignal()],G),N=null;const U=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let ce,me=null;const he=()=>new X("Request body larger than maxBodyLength limit",X.ERR_BAD_REQUEST,S,N);try{let Y;const ve=K("auth");if(ve){const we=P.getSafeProp(ve,"username")||"",at=P.getSafeProp(ve,"password")||"";Y={username:we,password:at}}if(xE(L)){const we=new URL(L,ft.origin);if(!Y&&(we.username||we.password)){const at=dm(we.username),Jt=dm(we.password);Y={username:at,password:Jt}}(we.username||we.password)&&(we.username="",we.password="",L=we.href)}if(Y&&(be.delete("authorization"),be.set("Authorization","Basic "+btoa(wE((Y.username||"")+":"+(Y.password||""))))),Se&&typeof L=="string"&&L.startsWith("data:")&&vE(L)>J)throw new X("maxContentLength size of "+J+" exceeded",X.ERR_BAD_RESPONSE,S,N);if(Ee&&O!=="get"&&O!=="head"){const we=await k(j);if(typeof we=="number"&&isFinite(we)&&(ce=we,we>_e))throw he()}const Re=Ee&&(P.isReadableStream(j)||P.isStream(j)),ye=(we,at,Jt)=>um(we,cm,Zt=>{if(Ee&&Zt>_e)throw me=he();at&&at(Zt)},Jt);if(E&&O!=="get"&&O!=="head"&&(oe||Re)){if(ce=ce??await x(be,j),ce!==0||Re){let we=new u(L,{method:"POST",body:j,duplex:"half"}),at;if(P.isFormData(j)&&(at=we.headers.get("content-type"))&&be.setContentType(at),we.body){const[Jt,Zt]=oe&&im(ce,Fa(om(oe)))||[];j=ye(we.body,Jt,Zt)}}}else if(Re&&!m&&v&&O!=="get"&&O!=="head")j=ye(j);else if(Re&&m&&!E&&O!=="get"&&O!=="head")throw new X("Stream request bodies are not supported by the current fetch implementation",X.ERR_NOT_SUPPORT,S,N);P.isString(Te)||(Te=Te?"include":"omit");const tt=m&&"credentials"in u.prototype;if(P.isFormData(j)){const we=be.getContentType();we&&/^multipart\/form-data/i.test(we)&&!/boundary=/i.test(we)&&be.delete("content-type")}be.set("User-Agent","axios/"+dd,!1);const Ft={...xe,signal:F,method:O.toUpperCase(),headers:Ty(be.normalize()),body:j,duplex:"half",credentials:tt?Te:void 0};N=m&&new u(L,Ft);let ot=await(m?ae(N,xe):ae(L,Ft));const Xt=wt.from(ot.headers);if(Se){const we=P.toFiniteNumber(Xt.getContentLength());if(we!=null&&we>J)throw new X("maxContentLength size of "+J+" exceeded",X.ERR_BAD_RESPONSE,S,N)}const Ut=A&&(ue==="stream"||ue==="response");if(A&&ot.body&&(B||Se||Ut&&U)){const we={};["status","statusText","headers"].forEach(_n=>{we[_n]=ot[_n]});const at=P.toFiniteNumber(Xt.getContentLength()),[Jt,Zt]=B&&im(at,Fa(om(B),!0))||[];let Mn=0;const Fn=_n=>{if(Se&&(Mn=_n,Mn>J))throw new X("maxContentLength size of "+J+" exceeded",X.ERR_BAD_RESPONSE,S,N);Jt&&Jt(_n)};ot=new d(um(ot.body,cm,Fn,()=>{Zt&&Zt(),U&&U()}),we)}ue=ue||"text";let Bt=await D[P.findKey(D,ue)||"text"](ot,S);if(Se&&!A&&!Ut){let we;if(Bt!=null&&(typeof Bt.byteLength=="number"?we=Bt.byteLength:typeof Bt.size=="number"?we=Bt.size:typeof Bt=="string"&&(we=typeof i=="function"?new i().encode(Bt).byteLength:Bt.length)),typeof we=="number"&&we>J)throw new X("maxContentLength size of "+J+" exceeded",X.ERR_BAD_RESPONSE,S,N)}return!Ut&&U&&U(),await new Promise((we,at)=>{Dy(we,at,{data:Bt,headers:wt.from(ot.headers),status:ot.status,statusText:ot.statusText,config:S,request:N})})}catch(Y){if(U&&U(),F&&F.aborted&&F.reason instanceof X){const ve=F.reason;throw ve.config=S,N&&(ve.request=N),Y!==ve&&Object.defineProperty(ve,"cause",{__proto__:null,value:Y,writable:!0,enumerable:!1,configurable:!0}),ve}if(me)throw N&&!me.request&&(me.request=N),me;if(Y instanceof X)throw N&&!Y.request&&(Y.request=N),Y;if(Y&&Y.name==="TypeError"&&/Load failed|fetch/i.test(Y.message)){const ve=new X("Network Error",X.ERR_NETWORK,S,N,Y&&Y.response);throw Object.defineProperty(ve,"cause",{__proto__:null,value:Y.cause||Y,writable:!0,enumerable:!1,configurable:!0}),ve}throw X.from(Y,Y&&Y.code,S,N,Y&&Y.response)}}},SE=new Map,Uy=n=>{let t=n&&n.env||{};const{fetch:s,Request:i,Response:a}=t,u=[i,a,s];let d=u.length,h=d,m,g,v=SE;for(;h--;)m=u[h],g=v.get(m),g===void 0&&v.set(m,g=h?new Map:bE(t)),v=g;return g};Uy();const fd={http:z_,xhr:fE,fetch:{get:Uy}};P.forEach(fd,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const hm=n=>`- ${n}`,_E=n=>P.isFunction(n)||n===null||n===!1;function EE(n,t){n=P.isArray(n)?n:[n];const{length:s}=n;let i,a;const u={};for(let d=0;d`adapter ${m} `+(g===!1?"is not supported by the environment":"is not available in the build"));let h=s?d.length>1?`since : `+d.map(hm).join(` `):" "+hm(d[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+h,X.ERR_NOT_SUPPORT)}return a}const By={getAdapter:EE,adapters:fd};function Zu(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new so(null,n)}function pm(n){return Zu(n),n.headers=wt.from(n.headers),n.data=Ju.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),By.getAdapter(n.adapter||ro.adapter,n)(n).then(function(i){Zu(n),n.response=i;try{i.data=Ju.call(n,n.transformResponse,i)}finally{delete n.response}return i.headers=wt.from(i.headers),i},function(i){if(!Iy(i)&&(Zu(n),i&&i.response)){n.response=i.response;try{i.response.data=Ju.call(n,n.transformResponse,i.response)}finally{delete n.response}i.response.headers=wt.from(i.response.headers)}return Promise.reject(i)})}const Qa={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Qa[n]=function(i){return typeof i===n||"a"+(t<1?"n ":" ")+n}});const mm={};Qa.transitional=function(t,s,i){function a(u,d){return"[Axios v"+dd+"] Transitional option '"+u+"'"+d+(i?". "+i:"")}return(u,d,h)=>{if(t===!1)throw new X(a(d," has been removed"+(s?" in "+s:"")),X.ERR_DEPRECATED);return s&&!mm[d]&&(mm[d]=!0,console.warn(a(d," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(u,d,h):!0}};Qa.spelling=function(t){return(s,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function kE(n,t,s){if(typeof n!="object"||n===null)throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let a=i.length;for(;a-- >0;){const u=i[a],d=Object.prototype.hasOwnProperty.call(t,u)?t[u]:void 0;if(d){const h=n[u],m=h===void 0||d(h,u,n);if(m!==!0)throw new X("option "+u+" must be "+m,X.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new X("Unknown option "+u,X.ERR_BAD_OPTION)}}const Na={assertOptions:kE,validators:Qa},yt=Na.validators;let Gr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new rm,response:new rm}}async request(t,s){try{return await this._request(t,s)}catch(i){if(i instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const u=(()=>{if(!a.stack)return"";const d=a.stack.indexOf(` `);return d===-1?"":a.stack.slice(d+1)})();try{if(!i.stack)i.stack=u;else if(u){const d=u.indexOf(` `),h=d===-1?-1:u.indexOf(` `,d+1),m=h===-1?"":u.slice(h+1);String(i.stack).endsWith(m)||(i.stack+=` `+u)}}catch{}}throw i}}_request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=ts(this.defaults,s);const{transitional:i,paramsSerializer:a,headers:u}=s;i!==void 0&&Na.assertOptions(i,{silentJSONParsing:yt.transitional(yt.boolean),forcedJSONParsing:yt.transitional(yt.boolean),clarifyTimeoutError:yt.transitional(yt.boolean),legacyInterceptorReqResOrdering:yt.transitional(yt.boolean),advertiseZstdAcceptEncoding:yt.transitional(yt.boolean),validateStatusUndefinedResolves:yt.transitional(yt.boolean)},!1),a!=null&&(P.isFunction(a)?s.paramsSerializer={serialize:a}:Na.assertOptions(a,{encode:yt.function,serialize:yt.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),Na.assertOptions(s,{baseUrl:yt.spelling("baseURL"),withXsrfToken:yt.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let d=u&&P.merge(u.common,u[s.method]);u&&P.forEach(["delete","get","head","post","put","patch","query","common"],D=>{delete u[D]}),s.headers=wt.concat(d,u);const h=[];let m=!0;this.interceptors.request.forEach(function(k){if(typeof k.runWhen=="function"&&k.runWhen(s)===!1)return;m=m&&k.synchronous;const x=s.transitional||ud;x&&x.legacyInterceptorReqResOrdering?h.unshift(k.fulfilled,k.rejected):h.push(k.fulfilled,k.rejected)});const g=[];this.interceptors.response.forEach(function(k){g.push(k.fulfilled,k.rejected)});let v,w=0,E;if(!m){const D=[pm.bind(this),void 0];for(D.unshift(...h),D.push(...g),E=D.length,v=Promise.resolve(s);w{if(!i._listeners)return;let u=i._listeners.length;for(;u-- >0;)i._listeners[u](a);i._listeners=null}),this.promise.then=a=>{let u;const d=new Promise(h=>{i.subscribe(h),u=h}).then(a);return d.cancel=function(){i.unsubscribe(u)},d},t(function(u,d,h){i.reason||(i.reason=new so(u,d,h),s(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const t=new AbortController,s=i=>{t.abort(i)};return this.subscribe(s),t.signal.unsubscribe=()=>this.unsubscribe(s),t.signal}static source(){let t;return{token:new $y(function(a){t=a}),cancel:t}}};function RE(n){return function(s){return n.apply(null,s)}}function TE(n){return P.isObject(n)&&n.isAxiosError===!0}const Lc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Lc).forEach(([n,t])=>{Lc[t]=n});function Vy(n){const t=new Gr(n),s=wy(Gr.prototype.request,t);return P.extend(s,Gr.prototype,t,{allOwnKeys:!0}),P.extend(s,t,null,{allOwnKeys:!0}),s.create=function(a){return Vy(ts(n,a))},s}const Ke=Vy(ro);Ke.Axios=Gr;Ke.CanceledError=so;Ke.CancelToken=CE;Ke.isCancel=Iy;Ke.VERSION=dd;Ke.toFormData=qa;Ke.AxiosError=X;Ke.Cancel=Ke.CanceledError;Ke.all=function(t){return Promise.all(t)};Ke.spread=RE;Ke.isAxiosError=TE;Ke.mergeConfig=ts;Ke.AxiosHeaders=wt;Ke.formToJSON=n=>zy(P.isHTMLForm(n)?new FormData(n):n);Ke.getAdapter=By.getAdapter;Ke.HttpStatusCode=Lc;Ke.default=Ke;const{Axios:A2,AxiosError:j2,CanceledError:L2,isCancel:z2,CancelToken:I2,VERSION:D2,all:M2,Cancel:F2,isAxiosError:U2,spread:B2,toFormData:$2,AxiosHeaders:V2,HttpStatusCode:H2,formToJSON:W2,getAdapter:q2,mergeConfig:Q2,create:K2}=Ke,Hy=typeof window>"u",gm=!Hy&&window.self!==window.top,NE=!Hy&&typeof document>"u",ec=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),ct=[];for(let n=0;n<256;++n)ct.push((n+256).toString(16).slice(1));function PE(n,t=0){return(ct[n[t+0]]+ct[n[t+1]]+ct[n[t+2]]+ct[n[t+3]]+"-"+ct[n[t+4]]+ct[n[t+5]]+"-"+ct[n[t+6]]+ct[n[t+7]]+"-"+ct[n[t+8]]+ct[n[t+9]]+"-"+ct[n[t+10]]+ct[n[t+11]]+ct[n[t+12]]+ct[n[t+13]]+ct[n[t+14]]+ct[n[t+15]]).toLowerCase()}let tc;const OE=new Uint8Array(16);function AE(){if(!tc){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");tc=crypto.getRandomValues.bind(crypto)}return tc(OE)}const jE=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ym={randomUUID:jE};function LE(n,t,s){var a;n=n||{};const i=n.random??((a=n.rng)==null?void 0:a.call(n))??AE();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,PE(i)}function zE(n,t,s){return ym.randomUUID&&!n?ym.randomUUID():LE(n)}const Li=typeof window<"u"?window:{base44SharedInstances:{}};function IE(n,t){return Li.base44SharedInstances||(Li.base44SharedInstances={}),Li.base44SharedInstances[n]||(Li.base44SharedInstances[n]={instance:t()}),Li.base44SharedInstances[n].instance}const DE="__user_heartbeat_event__",ME="__initialization_event__",FE="__session_duration_event__",vm="analytics-enable",wm="base44_analytics_session_id",UE={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},BE="analytics",De=IE(BE,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...UE,...GE()}})),$E=({axiosClient:n,serverUrl:t,appId:s,userAuthModule:i})=>{var a;const{maxQueueSize:u,throttleTime:d,batchSize:h}=De.config;if(!(!((a=De.config)===null||a===void 0)&&a.enabled)||NE)return{track:()=>{},cleanup:()=>{}};let m;const g=`${t}/api/apps/${s}/analytics/track/batch`,v=async O=>{await n.request({method:"POST",url:`/apps/${s}/analytics/track/batch`,data:{events:O}})},w=O=>{try{const j=JSON.stringify({events:O}),V=new Blob([j],{type:"application/json"});return typeof navigator>"u"||j.length>6e4||!navigator.sendBeacon(g,V)}catch{return!1}},E=async(O,j={})=>{if(O.length===0)return;const V=await KE(i),$=O.map(QE(V));try{(!j.isBeacon||!w($))&&await v($)}catch{}},A=()=>{bm(E,{throttleTime:d,batchSize:h})},D=O=>{if(De.requestsQueue.length>=u)return;const j=qE();De.requestsQueue.push({...O,...j}),A()},k=()=>{bm(E,{throttleTime:d,batchSize:h}),m=Sm(D),HE()},x=()=>{xm(),m==null||m(),WE(D);const O=De.requestsQueue.splice(0);E(O,{isBeacon:!0})},S=()=>{typeof window>"u"||(document.visibilityState==="hidden"?x():document.visibilityState==="visible"&&k())},L=()=>{xm(),m==null||m(),typeof window<"u"&&window.removeEventListener("visibilitychange",S)};return A(),m=Sm(D),VE(D),typeof window<"u"&&window.addEventListener("visibilitychange",S),{track:D,cleanup:L}};function xm(){De.isProcessing=!1}async function bm(n,t){if(De.isProcessing)return;De.isProcessing=!0;const{throttleTime:s=1e3,batchSize:i=30}=t??{};for(;De.isProcessing&&De.requestsQueue.length>0;){const a=De.requestsQueue.splice(0,i);a.length&&await n(a),await new Promise(u=>setTimeout(u,s))}De.isProcessing=!1}function Sm(n){var t;if(De.isHeartBeatProcessing||((t=De.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};De.isHeartBeatProcessing=!0;const s=setInterval(()=>{n({eventName:DE})},De.config.heartBeatInterval);return()=>{clearInterval(s),De.isHeartBeatProcessing=!1}}function VE(n){typeof window>"u"||De.wasInitializationTracked||(De.wasInitializationTracked=!0,n({eventName:ME,properties:{referrer:document==null?void 0:document.referrer}}))}function HE(){typeof window>"u"||De.sessionStartTime!==null||(De.sessionStartTime=new Date().toISOString())}function WE(n){if(typeof window>"u"||De.sessionStartTime===null)return;const t=new Date().getTime()-new Date(De.sessionStartTime).getTime();De.sessionStartTime=null,n({eventName:FE,properties:{sessionDuration:t}})}function qE(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function QE(n){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...n})}let nc=null;async function KE(n){if(!De.sessionContext){if(!nc){const t=hd();nc=n.me().then(s=>({user_id:s.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}De.sessionContext=await nc}return De.sessionContext}function GE(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(vm);if(t==null||!t.length)return;const s=new URLSearchParams(window.location.search);s.delete(vm);const i=window.location.pathname+(s.toString()?"?"+s.toString():"");return window.history.replaceState({},"",i),{enabled:t==="true"}}function hd(){if(typeof window>"u")return ec();try{const n=localStorage.getItem(wm);if(!n){const t=ec();return localStorage.setItem(wm,t),t}return n}catch{return ec()}}class YE extends Error{constructor(t,s,i,a,u){super(t),this.name="Base44Error",this.status=s,this.code=i,this.data=a,this.originalError=u}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function Di({baseURL:n,headers:t={},token:s,interceptResponses:i=!0,onError:a}){const u=Ke.create({baseURL:n,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return s&&(u.defaults.headers.common.Authorization=`Bearer ${s}`),u.interceptors.request.use(d=>{typeof window<"u"&&window.location&&(d.headers.set("X-Origin-URL",window.location.href),d.headers.get("Authorization")||d.headers.set("X-Base44-Anonymous-Id",hd()));const h=zE();if(d.requestId=h,gm)try{window.parent.postMessage({type:"api-request-start",requestId:h,data:{url:n+d.url,method:d.method,body:d.data instanceof FormData?"[FormData object]":d.data}},"*")}catch{}return d}),i&&u.interceptors.response.use(d=>{var h;const m=(h=d.config)===null||h===void 0?void 0:h.requestId;try{gm&&m&&window.parent.postMessage({type:"api-request-end",requestId:m,data:{statusCode:d.status,response:d.data}},"*")}catch{}return d.data},d=>{var h,m,g,v,w,E,A,D;const k=((m=(h=d.response)===null||h===void 0?void 0:h.data)===null||m===void 0?void 0:m.message)||((v=(g=d.response)===null||g===void 0?void 0:g.data)===null||v===void 0?void 0:v.detail)||d.message,x=new YE(k,(w=d.response)===null||w===void 0?void 0:w.status,(A=(E=d.response)===null||E===void 0?void 0:E.data)===null||A===void 0?void 0:A.code,(D=d.response)===null||D===void 0?void 0:D.data,d);return a==null||a(x),Promise.reject(x)}),u}function _m(n){const{axios:t,appId:s,getSocket:i}=n;return new Proxy({},{get(a,u){if(!(typeof u!="string"||u==="then"||u.startsWith("_")))return JE(t,s,u,i)}})}function XE(n){var t;try{const s=JSON.parse(n);return{type:s.type,data:s.data,id:s.id||((t=s.data)===null||t===void 0?void 0:t.id),timestamp:s.timestamp||new Date().toISOString()}}catch(s){return console.warn("[Base44 SDK] Failed to parse realtime message:",s),null}}function JE(n,t,s,i){const a=`/apps/${t}/entities/${s}`;return{async list(u,d,h,m){const g={};return u&&(g.sort=u),d&&(g.limit=d),h&&(g.skip=h),m&&(g.fields=Array.isArray(m)?m.join(","):m),n.get(a,{params:g})},async filter(u,d,h,m,g){const v={q:JSON.stringify(u)};return d&&(v.sort=d),h&&(v.limit=h),m&&(v.skip=m),g&&(v.fields=Array.isArray(g)?g.join(","):g),n.get(a,{params:v})},async get(u){return n.get(`${a}/${u}`)},async create(u){return n.post(a,u)},async update(u,d){return n.put(`${a}/${u}`,d)},async delete(u){return n.delete(`${a}/${u}`)},async deleteMany(u){return n.delete(a,{data:u})},async bulkCreate(u){return n.post(`${a}/bulk`,u)},async updateMany(u,d){return n.patch(`${a}/update-many`,{query:u,data:d})},async bulkUpdate(u){return n.put(`${a}/bulk`,u)},async importEntities(u){const d=new FormData;return d.append("file",u,u.name),n.post(`${a}/import`,d,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(u){const d=`entities:${t}:${s}`;return i().subscribeToRoom(d,{update_model:g=>{var v;const w=XE(g.data);if(w){w.type!=="delete"&&(!((v=w.data)===null||v===void 0)&&v._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${s}#${w.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${s}.get("${w.id}")\` to fetch the full record.`);try{u(w)}catch(E){console.error("[Base44 SDK] Subscription callback error:",E)}}}})}}}function ZE(n,t){return{async call(s,i,a){if(!(s!=null&&s.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(i!=null&&i.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:u,queryParams:d,...h}=a??{},m={...h,...u&&{path_params:u},...d&&{query_params:d}};return await n.post(`/apps/${t}/integrations/custom/${s}/${i}`,m)}}}function Em(n,t){const s=ZE(n,t);return new Proxy({},{get(i,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return a==="custom"?s:new Proxy({},{get(u,d){if(!(typeof d!="string"||d==="then"||d.startsWith("_")))return async h=>{if(typeof h=="string")throw new Error(`Integration ${d} must receive an object with named parameters, received: ${h}`);let m,g;return h instanceof FormData||h&&Object.values(h).some(v=>v instanceof File)?(m=new FormData,Object.keys(h).forEach(v=>{h[v]instanceof File?m.append(v,h[v],h[v].name):typeof h[v]=="object"&&h[v]!==null?m.append(v,JSON.stringify(h[v])):m.append(v,h[v])}),g="multipart/form-data"):(m=h,g="application/json"),a==="Core"?n.post(`/apps/${t}/integration-endpoints/Core/${d}`,m||h,{headers:{"Content-Type":g}}):n.post(`/apps/${t}/integration-endpoints/installable/${a}/integration-endpoints/${d}`,m||h,{headers:{"Content-Type":g}})}}})}})}function ek(){return typeof window>"u"?!1:window!==window.parent}function tk(n,t,s){const u=Math.round(window.screenX+(window.outerWidth-500)/2),d=Math.round(window.screenY+(window.outerHeight-600)/2),h=window.open(n,"base44_auth",`width=500,height=600,left=${u},top=${d},resizable=yes,scrollbars=yes`);if(!h)return;const m=()=>{window.removeEventListener("message",g),clearInterval(v),h.closed||h.close()},g=w=>{var E;if(w.origin!==s||w.source!==h||!(!((E=w.data)===null||E===void 0)&&E.access_token))return;m();const A=new URL(t),{access_token:D,is_new_user:k}=w.data;A.searchParams.set("access_token",D),k!=null&&A.searchParams.set("is_new_user",String(k)),window.location.href=A.toString()},v=setInterval(()=>{h.closed&&m()},500);window.addEventListener("message",g)}function nk(n,t,s,i){return{async me(){return n.get(`/apps/${s}/entities/User/me`)},async updateMe(a){return n.put(`/apps/${s}/entities/User/me`,a)},redirectToLogin(a){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const u=a?new URL(a,window.location.origin).toString():window.location.href,d=`${i.appBaseUrl}/login?from_url=${encodeURIComponent(u)}`;window.location.href=d},loginWithProvider(a,u="/"){const d=new URL(u,window.location.origin).toString(),h=`app_id=${s}&from_url=${encodeURIComponent(d)}`;let m;a==="sso"?m=`/apps/${s}/auth/sso/login`:m=`/apps/auth${a==="google"?"":`/${a}`}/login`;const g=`${i.appBaseUrl}/api${m}?${h}`;if(ek()){const v=`${g}&popup_origin=${encodeURIComponent(window.location.origin)}`;return tk(v,d,window.location.origin)}window.location.href=g},logout(a){if(delete n.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(h){console.error("Failed to remove token from localStorage:",h)}const u=a||window.location.href,d=`${i.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(u)}`;window.location.href=d}},setToken(a,u=!0){if(a&&(n.defaults.headers.common.Authorization=`Bearer ${a}`,t.defaults.headers.common.Authorization=`Bearer ${a}`,u&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",a),window.localStorage.setItem("token",a)}catch(d){console.error("Failed to save token to localStorage:",d)}},async loginViaEmailPassword(a,u,d){var h;try{const m=await n.post(`/apps/${s}/auth/login`,{email:a,password:u,...d&&{turnstile_token:d}}),{access_token:g,user:v}=m;return g&&this.setToken(g),{access_token:g,user:v}}catch(m){throw((h=m.response)===null||h===void 0?void 0:h.status)===401&&await this.logout(),m}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(a,u){return n.post(`/apps/${s}/users/invite-user`,{user_email:a,role:u})},register(a){return n.post(`/apps/${s}/auth/register`,a)},verifyOtp({email:a,otpCode:u}){return n.post(`/apps/${s}/auth/verify-otp`,{email:a,otp_code:u})},resendOtp(a){return n.post(`/apps/${s}/auth/resend-otp`,{email:a})},resetPasswordRequest(a){return n.post(`/apps/${s}/auth/reset-password-request`,{email:a})},resetPassword({resetToken:a,newPassword:u}){return n.post(`/apps/${s}/auth/reset-password`,{reset_token:a,new_password:u})},changePassword({userId:a,currentPassword:u,newPassword:d}){return n.post(`/apps/${s}/auth/change-password`,{user_id:a,current_password:u,new_password:d})}}}function rk(n,t){return{async getAccessToken(s){const i=`/apps/${t}/auth/sso/accesstoken/${s}`;return n.get(i)},async getIdToken(s){const i=`/apps/${t}/auth/sso/idtoken/${s}`;return n.get(i)}}}function sk(n,t){return{async getAccessToken(s){if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");return(await n.get(`/apps/${t}/external-auth/tokens/${s}`)).access_token},async getConnection(s){var i;if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");const u=await n.get(`/apps/${t}/external-auth/tokens/${s}`);return{accessToken:u.access_token,connectionConfig:(i=u.connection_config)!==null&&i!==void 0?i:null}},async getWorkspaceConnection(s){var i;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await n.get(`/apps/${t}/external-auth/tokens/connectors/${s}`);return{accessToken:u.access_token,connectionConfig:(i=u.connection_config)!==null&&i!==void 0?i:null}},async getCurrentAppUserAccessToken(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await n.get(`/apps/${t}/app-user-auth/connectors/${s}/token`)).access_token},async getCurrentAppUserConnection(s){var i;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await n.get(`/apps/${t}/app-user-auth/connectors/${s}/token`);return{accessToken:u.access_token,connectionConfig:(i=u.connection_config)!==null&&i!==void 0?i:null}}}}function ik(n,t){return{async connectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await n.post(`/apps/${t}/app-user-auth/connectors/${s}/initiate`)).redirect_url},async disconnectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");await n.delete(`/apps/${t}/app-user-auth/connectors/${s}`)}}}function Yr(n={}){const{storageKey:t="base44_access_token",paramName:s="access_token",saveToStorage:i=!0,removeFromUrl:a=!0}=n;let u=null;if(typeof window<"u"&&window.location)try{const d=new URLSearchParams(window.location.search);if(u=d.get(s),u){if(i&&ok(u,{storageKey:t}),a){d.delete(s);const h=`${window.location.pathname}${d.toString()?`?${d.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,h)}return u}}catch(d){console.error("Error retrieving token from URL:",d)}if(typeof window<"u"&&window.localStorage)try{return u=window.localStorage.getItem(t),u}catch(d){console.error("Error retrieving token from local storage:",d)}return null}function ok(n,t){const{storageKey:s="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!n)return!1;try{return window.localStorage.setItem(s,n),window.localStorage.setItem("token",n),!0}catch(i){return console.error("Error saving token to local storage:",i),!1}}function km(n,t,s){const i=(u,d)=>u?`${String(u).replace(/\/$/,"")}${d}`:d,a=u=>{const d=new Headers;if(s!=null&&s.getAuthHeaders){const h=s.getAuthHeaders();Object.entries(h).forEach(([m,g])=>{g!=null&&d.set(m,String(g))})}return u&&new Headers(u).forEach((h,m)=>{d.set(m,h)}),d};return{async invoke(u,d){if(typeof d=="string")throw new Error(`Function ${u} must receive an object with named parameters, received: ${d}`);let h,m;return d instanceof FormData||d&&Object.values(d).some(g=>g instanceof File)?(h=new FormData,Object.keys(d).forEach(g=>{d[g]instanceof File?h.append(g,d[g],d[g].name):typeof d[g]=="object"&&d[g]!==null?h.append(g,JSON.stringify(d[g])):h.append(g,d[g])}),m="multipart/form-data"):(h=d,m="application/json"),n.post(`/apps/${t}/functions/${u}`,h||d,{headers:{"Content-Type":m}})},async fetch(u,d={}){const m=`/functions${u.startsWith("/")?u:`/${u}`}`,g=a(d.headers),v={...d,headers:g};return await fetch(i(s==null?void 0:s.baseURL,m),v)}}}function Cm({axios:n,getSocket:t,appId:s,serverUrl:i,token:a}){const u=`/apps/${s}/agents`,d={},h=()=>n.get(`${u}/conversations`),m=k=>n.get(`${u}/conversations/${k}`);return{getConversations:h,getConversation:m,listConversations:k=>n.get(`${u}/conversations`,{params:k}),createConversation:k=>n.post(`${u}/conversations`,k),addMessage:async(k,x)=>n.post(`${u}/conversations/v2/${k.id}/messages`,x),subscribeToConversation:(k,x)=>{const S=`/agent-conversations/${k}`,L=t(),O=m(k).then(j=>(d[k]=j,j));return L.subscribeToRoom(S,{connect:()=>{},update_model:async({data:j})=>{const V=JSON.parse(j);if(V._message){await O;const $=V._message,G=d[k];if(G){const B=G.messages||[],oe=B.findIndex(be=>be.id===$.id),ue=oe!==-1?B.map((be,Te)=>Te===oe?$:be):[...B,$];d[k]={...G,messages:ue},x==null||x(d[k])}}}})},getWhatsAppConnectURL:k=>{const x=`${i}/api/apps/${s}/agents/${encodeURIComponent(k)}/whatsapp`,S=a??Yr();return S?`${x}?token=${S}`:x},getTelegramConnectURL:k=>{const x=`${i}/api/apps/${s}/agents/${encodeURIComponent(k)}/telegram`,S=a??Yr();return S?`${x}?token=${S}`:x}}}function Rm({serverUrl:n,token:t,appId:s}){return{connection:()=>{var a;return{baseURL:`${n}/api/apps/${s}/ai/openai/v1`,token:(a=t??Yr())!==null&&a!==void 0?a:""}}}}function Tm(n,t){const s=`/app-logs/${t}`;return{async logUserInApp(i){await n.post(`${s}/log-user-in-app/${i}`)},async fetchLogs(i={}){return await n.get(s,{params:i})},async getStats(i={}){return await n.get(`${s}/stats`,{params:i})}}}function ak(n,t){return{async inviteUser(s,i){if(i!=="user"&&i!=="admin")throw new Error(`Invalid role: "${i}". Role must be either "user" or "admin".`);return await n.post(`/apps/${t}/runtime/users/invite-user`,{user_email:s,role:i})}}}const bn=Object.create(null);bn.open="0";bn.close="1";bn.ping="2";bn.pong="3";bn.message="4";bn.upgrade="5";bn.noop="6";const Pa=Object.create(null);Object.keys(bn).forEach(n=>{Pa[bn[n]]=n});const zc={type:"error",data:"parser error"},Wy=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",qy=typeof ArrayBuffer=="function",Qy=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,pd=({type:n,data:t},s,i)=>Wy&&t instanceof Blob?s?i(t):Nm(t,i):qy&&(t instanceof ArrayBuffer||Qy(t))?s?i(t):Nm(new Blob([t]),i):i(bn[n]+(t||"")),Nm=(n,t)=>{const s=new FileReader;return s.onload=function(){const i=s.result.split(",")[1];t("b"+(i||""))},s.readAsDataURL(n)};function Pm(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let rc;function lk(n,t){if(Wy&&n.data instanceof Blob)return n.data.arrayBuffer().then(Pm).then(t);if(qy&&(n.data instanceof ArrayBuffer||Qy(n.data)))return t(Pm(n.data));pd(n,!1,s=>{rc||(rc=new TextEncoder),t(rc.encode(s))})}const Om="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mi=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n{let t=n.length*.75,s=n.length,i,a=0,u,d,h,m;n[n.length-1]==="="&&(t--,n[n.length-2]==="="&&t--);const g=new ArrayBuffer(t),v=new Uint8Array(g);for(i=0;i>4,v[a++]=(d&15)<<4|h>>2,v[a++]=(h&3)<<6|m&63;return g},ck=typeof ArrayBuffer=="function",md=(n,t)=>{if(typeof n!="string")return{type:"message",data:Ky(n,t)};const s=n.charAt(0);return s==="b"?{type:"message",data:dk(n.substring(1),t)}:Pa[s]?n.length>1?{type:Pa[s],data:n.substring(1)}:{type:Pa[s]}:zc},dk=(n,t)=>{if(ck){const s=uk(n);return Ky(s,t)}else return{base64:!0,data:n}},Ky=(n,t)=>{switch(t){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},Gy="",fk=(n,t)=>{const s=n.length,i=new Array(s);let a=0;n.forEach((u,d)=>{pd(u,!1,h=>{i[d]=h,++a===s&&t(i.join(Gy))})})},hk=(n,t)=>{const s=n.split(Gy),i=[];for(let a=0;a{const i=s.length;let a;if(i<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,i);else if(i<65536){a=new Uint8Array(3);const u=new DataView(a.buffer);u.setUint8(0,126),u.setUint16(1,i)}else{a=new Uint8Array(9);const u=new DataView(a.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(i))}n.data&&typeof n.data!="string"&&(a[0]|=128),t.enqueue(a),t.enqueue(s)})}})}let sc;function Sa(n){return n.reduce((t,s)=>t+s.length,0)}function _a(n,t){if(n[0].length===t)return n.shift();const s=new Uint8Array(t);let i=0;for(let a=0;aMath.pow(2,21)-1){h.enqueue(zc);break}a=v*Math.pow(2,32)+g.getUint32(4),i=3}else{if(Sa(s)n){h.enqueue(zc);break}}}})}const Yy=4;function Ye(n){if(n)return gk(n)}function gk(n){for(var t in Ye.prototype)n[t]=Ye.prototype[t];return n}Ye.prototype.on=Ye.prototype.addEventListener=function(n,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(t),this};Ye.prototype.once=function(n,t){function s(){this.off(n,s),t.apply(this,arguments)}return s.fn=t,this.on(n,s),this};Ye.prototype.off=Ye.prototype.removeListener=Ye.prototype.removeAllListeners=Ye.prototype.removeEventListener=function(n,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+n];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var i,a=0;aPromise.resolve().then(t):(t,s)=>s(t,0),Yt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),yk="arraybuffer";function Xy(n,...t){return t.reduce((s,i)=>(n.hasOwnProperty(i)&&(s[i]=n[i]),s),{})}const vk=Yt.setTimeout,wk=Yt.clearTimeout;function Ga(n,t){t.useNativeTimers?(n.setTimeoutFn=vk.bind(Yt),n.clearTimeoutFn=wk.bind(Yt)):(n.setTimeoutFn=Yt.setTimeout.bind(Yt),n.clearTimeoutFn=Yt.clearTimeout.bind(Yt))}const xk=1.33;function bk(n){return typeof n=="string"?Sk(n):Math.ceil((n.byteLength||n.size)*xk)}function Sk(n){let t=0,s=0;for(let i=0,a=n.length;i=57344?s+=3:(i++,s+=4);return s}function Jy(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function _k(n){let t="";for(let s in n)n.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(n[s]));return t}function Ek(n){let t={},s=n.split("&");for(let i=0,a=s.length;i{this.readyState="paused",t()};if(this._polling||!this.writable){let i=0;this._polling&&(i++,this.once("pollComplete",function(){--i||s()})),this.writable||(i++,this.once("drain",function(){--i||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const s=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};hk(t,this.socket.binaryType).forEach(s),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,fk(t,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=Jy()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(t,s)}}let Zy=!1;try{Zy=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Rk=Zy;function Tk(){}class Nk extends Ck{constructor(t){if(super(t),typeof location<"u"){const s=location.protocol==="https:";let i=location.port;i||(i=s?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port}}doWrite(t,s){const i=this.request({method:"POST",data:t});i.on("success",s),i.on("error",(a,u)=>{this.onError("xhr post error",a,u)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(s,i)=>{this.onError("xhr poll error",s,i)}),this.pollXhr=t}}class xn extends Ye{constructor(t,s,i){super(),this.createRequest=t,Ga(this,i),this._opts=i,this._method=i.method||"GET",this._uri=s,this._data=i.data!==void 0?i.data:null,this._create()}_create(){var t;const s=Xy(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const i=this._xhr=this.createRequest(s);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&i.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{i.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var a;i.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(i.getResponseHeader("set-cookie"))),i.readyState===4&&(i.status===200||i.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof i.status=="number"?i.status:0)},0))},i.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=xn.requestsCount++,xn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Tk,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete xn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}xn.requestsCount=0;xn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Am);else if(typeof addEventListener=="function"){const n="onpagehide"in Yt?"pagehide":"unload";addEventListener(n,Am,!1)}}function Am(){for(let n in xn.requests)xn.requests.hasOwnProperty(n)&&xn.requests[n].abort()}const Pk=(function(){const n=ev({xdomain:!1});return n&&n.responseType!==null})();class Ok extends Nk{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=Pk&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new xn(ev,this.uri(),t)}}function ev(n){const t=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Rk))return new XMLHttpRequest}catch{}if(!t)try{return new Yt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const tv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Ak extends gd{get name(){return"websocket"}doOpen(){const t=this.uri(),s=this.opts.protocols,i=tv?{}:Xy(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,i)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let s=0;s{try{this.doWrite(i,u)}catch{}a&&Ka(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=Jy()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const ic=Yt.WebSocket||Yt.MozWebSocket;class jk extends Ak{createSocket(t,s,i){return tv?new ic(t,s,i):s?new ic(t,s):new ic(t)}doWrite(t,s){this.ws.send(s)}}class Lk extends gd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const s=mk(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=t.readable.pipeThrough(s).getReader(),a=pk();a.readable.pipeTo(t.writable),this._writer=a.writable.getWriter();const u=()=>{i.read().then(({done:h,value:m})=>{h||(this.onPacket(m),u())}).catch(h=>{})};u();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let s=0;s{a&&Ka(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const zk={websocket:jk,webtransport:Lk,polling:Ok},Ik=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Dk=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ic(n){if(n.length>8e3)throw"URI too long";const t=n,s=n.indexOf("["),i=n.indexOf("]");s!=-1&&i!=-1&&(n=n.substring(0,s)+n.substring(s,i).replace(/:/g,";")+n.substring(i,n.length));let a=Ik.exec(n||""),u={},d=14;for(;d--;)u[Dk[d]]=a[d]||"";return s!=-1&&i!=-1&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=Mk(u,u.path),u.queryKey=Fk(u,u.query),u}function Mk(n,t){const s=/\/{2,9}/g,i=t.replace(s,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&i.splice(0,1),t.slice(-1)=="/"&&i.splice(i.length-1,1),i}function Fk(n,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,a,u){a&&(s[a]=u)}),s}const Dc=typeof addEventListener=="function"&&typeof removeEventListener=="function",Oa=[];Dc&&addEventListener("offline",()=>{Oa.forEach(n=>n())},!1);class wr extends Ye{constructor(t,s){if(super(),this.binaryType=yk,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){const i=Ic(t);s.hostname=i.host,s.secure=i.protocol==="https"||i.protocol==="wss",s.port=i.port,i.query&&(s.query=i.query)}else s.host&&(s.hostname=Ic(s.host).host);Ga(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(i=>{const a=i.prototype.name;this.transports.push(a),this._transportsByName[a]=i}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Ek(this.opts.query)),Dc&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Oa.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=Yy,s.transport=t,this.id&&(s.sid=this.id);const i=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](i)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&wr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",wr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let i=0;i0&&s>this._maxPayload)return this.writeBuffer.slice(0,i);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Ka(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,i){return this._sendPacket("message",t,s,i),this}send(t,s,i){return this._sendPacket("message",t,s,i),this}_sendPacket(t,s,i,a){if(typeof s=="function"&&(a=s,s=void 0),typeof i=="function"&&(a=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const u={type:t,data:s,options:i};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),a&&this.once("flush",a),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},i=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}_onError(t){if(wr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Dc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const i=Oa.indexOf(this._offlineEventListener);i!==-1&&Oa.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}wr.protocol=Yy;class Uk extends wr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{i||(s.send([{type:"ping",data:"probe"}]),s.once("packet",w=>{if(!i)if(w.type==="pong"&&w.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;wr.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(v(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const E=new Error("probe error");E.transport=s.name,this.emitReserved("upgradeError",E)}}))};function u(){i||(i=!0,v(),s.close(),s=null)}const d=w=>{const E=new Error("probe error: "+w);E.transport=s.name,u(),this.emitReserved("upgradeError",E)};function h(){d("transport closed")}function m(){d("socket closed")}function g(w){s&&w.name!==s.name&&u()}const v=()=>{s.removeListener("open",a),s.removeListener("error",d),s.removeListener("close",h),this.off("close",m),this.off("upgrading",g)};s.once("open",a),s.once("error",d),s.once("close",h),this.once("close",m),this.once("upgrading",g),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{i||s.open()},200):s.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const s=[];for(let i=0;izk[u]).filter(u=>!!u)),super(i?a:t,a)}};function $k(n,t="",s){let i=n;s=s||typeof location<"u"&&location,n==null&&(n=s.protocol+"//"+s.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=s.protocol+n:n=s.host+n),/^(https?|wss?):\/\//.test(n)||(typeof s<"u"?n=s.protocol+"//"+n:n="https://"+n),i=Ic(n)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const u=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+u+":"+i.port+t,i.href=i.protocol+"://"+u+(s&&s.port===i.port?"":":"+i.port),i}const Vk=typeof ArrayBuffer=="function",Hk=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,nv=Object.prototype.toString,Wk=typeof Blob=="function"||typeof Blob<"u"&&nv.call(Blob)==="[object BlobConstructor]",qk=typeof File=="function"||typeof File<"u"&&nv.call(File)==="[object FileConstructor]";function yd(n){return Vk&&(n instanceof ArrayBuffer||Hk(n))||Wk&&n instanceof Blob||qk&&n instanceof File}function Aa(n,t){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let s=0,i=n.length;s=0&&n.numthis.opts.maxAttachments)throw new Error("too many attachments");i.attachments=h}if(t.charAt(s+1)==="/"){const u=s+1;for(;++s&&!(t.charAt(s)===","||s===t.length););i.nsp=t.substring(u,s)}else i.nsp="/";const a=t.charAt(s+1);if(a!==""&&Number(a)==a){const u=s+1;for(;++s;){const d=t.charAt(s);if(d==null||Number(d)!=d){--s;break}if(s===t.length)break}i.id=Number(t.substring(u,s+1))}if(t.charAt(++s)){const u=this.tryParse(t.substr(s));if(vd.isPayloadValid(i.type,u))i.data=u;else throw new Error("invalid payload")}return i}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,s){switch(t){case Oe.CONNECT:return jm(s);case Oe.DISCONNECT:return s===void 0;case Oe.CONNECT_ERROR:return typeof s=="string"||jm(s);case Oe.EVENT:case Oe.BINARY_EVENT:return Array.isArray(s)&&(typeof s[0]=="number"||typeof s[0]=="string"&&Gk.indexOf(s[0])===-1);case Oe.ACK:case Oe.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Xk{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const s=Kk(this.reconPack,this.buffers);return this.finishedReconstruction(),s}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Jk=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};function jm(n){return Object.prototype.toString.call(n)==="[object Object]"}const Zk=Object.freeze(Object.defineProperty({__proto__:null,Decoder:vd,Encoder:Yk,get PacketType(){return Oe}},Symbol.toStringTag,{value:"Module"}));function cn(n,t,s){return n.on(t,s),function(){n.off(t,s)}}const eC=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class rv extends Ye{constructor(t,s,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=s,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[cn(t,"open",this.onopen.bind(this)),cn(t,"packet",this.onpacket.bind(this)),cn(t,"error",this.onerror.bind(this)),cn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...s){var i,a,u;if(eC.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(s.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const d={type:Oe.EVENT,data:s};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof s[s.length-1]=="function"){const v=this.ids++,w=s.pop();this._registerAckCallback(v,w),d.id=v}const h=(a=(i=this.io.engine)===null||i===void 0?void 0:i.transport)===null||a===void 0?void 0:a.writable,m=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!h||(m?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(t,s){var i;const a=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(a===void 0){this.acks[t]=s;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let h=0;h{this.io.clearTimeoutFn(u),s.apply(this,h)};d.withError=!0,this.acks[t]=d}emitWithAck(t,...s){return new Promise((i,a)=>{const u=(d,h)=>d?a(d):i(h);u.withError=!0,s.push(u),this.emit(t,...s)})}_addToQueue(t){let s;typeof t[t.length-1]=="function"&&(s=t.pop());const i={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((a,...u)=>(this._queue[0],a!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(a)):(this._queue.shift(),s&&s(null,...u)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Oe.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(i=>String(i.id)===t)){const i=this.acks[t];delete this.acks[t],i.withError&&i.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Oe.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Oe.EVENT:case Oe.BINARY_EVENT:this.onevent(t);break;case Oe.ACK:case Oe.BINARY_ACK:this.onack(t);break;case Oe.DISCONNECT:this.ondisconnect();break;case Oe.CONNECT_ERROR:this.destroy();const i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){const s=t.data||[];t.id!=null&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const i of s)i.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const s=this;let i=!1;return function(...a){i||(i=!0,s.packet({type:Oe.ACK,id:t,data:a}))}}onack(t){const s=this.acks[t.id];typeof s=="function"&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Oe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const s=this._anyListeners;for(let i=0;i0&&n.jitter<=1?n.jitter:0,this.attempts=0}qs.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*n);n=(Math.floor(t*10)&1)==0?n-s:n+s}return Math.min(n,this.max)|0};qs.prototype.reset=function(){this.attempts=0};qs.prototype.setMin=function(n){this.ms=n};qs.prototype.setMax=function(n){this.max=n};qs.prototype.setJitter=function(n){this.jitter=n};class Uc extends Ye{constructor(t,s){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(s=t,t=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,Ga(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((i=s.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new qs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=t;const a=s.parser||Zk;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var s;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(s=this.backoff)===null||s===void 0||s.setMin(t),this)}randomizationFactor(t){var s;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(s=this.backoff)===null||s===void 0||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(s=this.backoff)===null||s===void 0||s.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Bk(this.uri,this.opts);const s=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const a=cn(s,"open",function(){i.onopen(),t&&t()}),u=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),t?t(h):this.maybeReconnectOnOpen()},d=cn(s,"error",u);if(this._timeout!==!1){const h=this._timeout,m=this.setTimeoutFn(()=>{a(),u(new Error("timeout")),s.close()},h);this.opts.autoUnref&&m.unref(),this.subs.push(()=>{this.clearTimeoutFn(m)})}return this.subs.push(a),this.subs.push(d),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(cn(t,"ping",this.onping.bind(this)),cn(t,"data",this.ondata.bind(this)),cn(t,"error",this.onerror.bind(this)),cn(t,"close",this.onclose.bind(this)),cn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(s){this.onclose("parse error",s)}}ondecoded(t){Ka(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,s){let i=this.nsps[t];return i?this._autoConnect&&!i.active&&i.connect():(i=new rv(this,t,s),this.nsps[t]=i),i}_destroy(t){const s=Object.keys(this.nsps);for(const i of s)if(this.nsps[i].active)return;this._close()}_packet(t){const s=this.encoder.encode(t);for(let i=0;it()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,s){var i;this.cleanup(),(i=this.engine)===null||i===void 0||i.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(a=>{a?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",a)):t.onreconnect()}))},s);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const zi={};function ja(n,t){typeof n=="object"&&(t=n,n=void 0),t=t||{};const s=$k(n,t.path||"/socket.io"),i=s.source,a=s.id,u=s.path,d=zi[a]&&u in zi[a].nsps,h=t.forceNew||t["force new connection"]||t.multiplex===!1||d;let m;return h?m=new Uc(i,t):(zi[a]||(zi[a]=new Uc(i,t)),m=zi[a]),s.query&&!t.query&&(t.query=s.queryKey),m.socket(s.path,t)}Object.assign(ja,{Manager:Uc,Socket:rv,io:ja,connect:ja});const tC=250;function Lm(n,t){var s;const i=(s=n.token)!==null&&s!==void 0?s:Yr(),a={app_id:n.appId,token:i};i||(a.anonymous_id=hd());const u=ja(n.serverUrl,{path:n.mountPath,transports:n.transports,query:a});return u.on("connect",async()=>{var d;return console.log("connect",u.id),(d=t.connect)===null||d===void 0?void 0:d.call(t)}),u.on("update_model",async d=>{var h;return(h=t.update_model)===null||h===void 0?void 0:h.call(t,d)}),u.on("error",async d=>{var h;return(h=t.error)===null||h===void 0?void 0:h.call(t,d)}),u.on("connect_error",async d=>{var h;return console.error("connect_error",d),(h=t.error)===null||h===void 0?void 0:h.call(t,d)}),u}function nC({config:n}){let t={...n};const s={},i={},a={connect:async()=>{const S=[];Object.keys(s).forEach(L=>{const O=E(L);O.length!==0&&(g(L),O.forEach(({connect:j})=>{const V=async()=>j==null?void 0:j();S.push(V())}))}),await Promise.all(S)},update_model:async S=>{const O=E(S.room).map(j=>{var V;return(V=j.update_model)===null||V===void 0?void 0:V.call(j,S)});await Promise.all(O)},error:async S=>{console.error("error",S);const L=Object.values(s).flat().map(O=>{var j;return(j=O.error)===null||j===void 0?void 0:j.call(O,S)});await Promise.all(L)}};let u=Lm(n,a);function d(){h()}function h(){D(),u&&u.disconnect()}function m(S){d(),t={...t,...S},u=Lm(t,a)}function g(S){u.emit("join",S)}function v(S){u.emit("leave",S)}async function w(S,L){var O;const j=JSON.stringify(L);return(O=a.update_model)===null||O===void 0?void 0:O.call(a,{room:S,data:j})}function E(S){var L;return(L=s[S])!==null&&L!==void 0?L:[]}function A(S){const L=i[S];L&&(clearTimeout(L),delete i[S])}function D(){Object.keys(i).forEach(S=>{var L,O;clearTimeout(i[S]),delete i[S],((O=(L=s[S])===null||L===void 0?void 0:L.length)!==null&&O!==void 0?O:0)===0&&delete s[S]})}function k(S){A(S),i[S]=setTimeout(()=>{var L,O;delete i[S],!(((O=(L=s[S])===null||L===void 0?void 0:L.length)!==null&&O!==void 0?O:0)>0)&&(v(S),delete s[S])},tC)}return{socket:u,subscribeToRoom:(S,L)=>{s[S]?A(S):(g(S),s[S]=[]),s[S].push(L);let O=!1;return()=>{var j,V;O||(O=!0,s[S]=(V=(j=s[S])===null||j===void 0?void 0:j.filter($=>$!==L))!==null&&V!==void 0?V:[],s[S].length===0&&k(S))}},updateConfig:m,updateModel:w,disconnect:h}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var sv=class extends Event{constructor(t,s){super("error",s);Le(this,"message");Le(this,"error");this.message=t.message,this.error=t}},iv=class extends Event{constructor(t=1e3,s="",i){super("close",i);Le(this,"code");Le(this,"reason");Le(this,"wasClean",!0);this.code=t,this.reason=s}},oc={Event,ErrorEvent:sv,CloseEvent:iv};function rC(n,t){if(!n)throw new Error(t)}function sC(n){return new n.constructor(n.type,n)}function iC(n){return"data"in n?new MessageEvent(n.type,n):"code"in n||"reason"in n?new iv(n.code||1999,n.reason||"unknown reason",n):"error"in n?new sv(n.error,n):new Event(n.type,n)}var eg,oC=typeof process<"u"&&typeof((eg=process.versions)==null?void 0:eg.node)<"u"&&typeof document>"u",Ea=oC?iC:sC,Ir={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},zm=!1,aC=class Dr extends EventTarget{constructor(s,i,a={}){super();Le(this,"_ws");Le(this,"_retryCount",-1);Le(this,"_uptimeTimeout");Le(this,"_connectTimeout");Le(this,"_shouldReconnect",!0);Le(this,"_connectLock",!1);Le(this,"_binaryType","blob");Le(this,"_closeCalled",!1);Le(this,"_messageQueue",[]);Le(this,"_url");Le(this,"_protocols");Le(this,"_options");Le(this,"onclose",null);Le(this,"onerror",null);Le(this,"onmessage",null);Le(this,"onopen",null);Le(this,"_handleOpen",s=>{this._debug("open event");const{minUptime:i=Ir.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),i),rC(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(a=>{var u;return(u=this._ws)==null?void 0:u.send(a)}),this._messageQueue=[],this.onopen&&this.onopen(s),this.dispatchEvent(Ea(s))});Le(this,"_handleMessage",s=>{this._debug("message event"),this.onmessage&&this.onmessage(s),this.dispatchEvent(Ea(s))});Le(this,"_handleError",s=>{this._debug("error event",s.message),this._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(s),this._debug("exec error listeners"),this.dispatchEvent(Ea(s)),this._connect()});Le(this,"_handleClose",s=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(s),this.dispatchEvent(Ea(s))});this._url=s,this._protocols=i,this._options=a,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return Dr.CONNECTING}get OPEN(){return Dr.OPEN}get CLOSING(){return Dr.CLOSING}get CLOSED(){return Dr.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(s){this._binaryType=s,this._ws&&(this._ws.binaryType=s)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((i,a)=>(typeof a=="string"?i+=a.length:a instanceof Blob?i+=a.size:i+=a.byteLength,i),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?Dr.CLOSED:Dr.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(s=1e3,i){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(s,i)}reconnect(s,i){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(s,i),this._connect())}send(s){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",s),this._ws.send(s);else{const{maxEnqueuedMessages:i=Ir.maxEnqueuedMessages}=this._options;this._messageQueue.length",...s])}_getNextDelay(){const{reconnectionDelayGrowFactor:s=Ir.reconnectionDelayGrowFactor,minReconnectionDelay:i=Ir.minReconnectionDelay,maxReconnectionDelay:a=Ir.maxReconnectionDelay}=this._options;let u=0;return this._retryCount>0&&(u=i*Math.pow(s,this._retryCount-1),u>a&&(u=a)),this._debug("next delay",u),u}_wait(){return new Promise(s=>{setTimeout(s,this._getNextDelay())})}_getNextProtocols(s){if(!s)return Promise.resolve(null);if(typeof s=="string"||Array.isArray(s))return Promise.resolve(s);if(typeof s=="function"){const i=s();if(!i)return Promise.resolve(null);if(typeof i=="string"||Array.isArray(i))return Promise.resolve(i);if(i.then)return i}throw Error("Invalid protocols")}_getNextUrl(s){if(typeof s=="string")return Promise.resolve(s);if(typeof s=="function"){const i=s();if(typeof i=="string")return Promise.resolve(i);if(i.then)return i}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:s=Ir.maxRetries,connectionTimeout:i=Ir.connectionTimeout}=this._options;if(this._retryCount>=s){this._debug("max retries reached",this._retryCount,">=",s);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([a,u])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!zm&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),zm=!0);const d=this._options.WebSocket||WebSocket;this._debug("connect",{url:a,protocols:u}),this._ws=u?new d(a,u):new d(a),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),i)}).catch(a=>{this._connectLock=!1,this._handleError(new oc.ErrorEvent(Error(a.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new oc.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(s=1e3,i){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(s,i),this._handleClose(new oc.CloseEvent(s,i,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */var lC=n=>n[1]!==null&&n[1]!==void 0;function uC(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let n=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){let i=Math.random()*16;return n>0?(i=(n+i)%16|0,n=Math.floor(n/16)):(i=(t+i)%16|0,t=Math.floor(t/16)),(s==="x"?i:i&3|8).toString(16)})}function ov(n,t,s={}){const{host:i,path:a,protocol:u,room:d,party:h,query:m}=n;let g=i.replace(/^(http|https|ws|wss):\/\//,"");if(g.endsWith("/")&&(g=g.slice(0,-1)),a&&a.startsWith("/"))throw new Error("path must not start with a slash");const v=h??"main",w=a?`/${a}`:"",E=u||(g.startsWith("localhost:")||g.startsWith("127.0.0.1:")||g.startsWith("192.168.")||g.startsWith("10.")||g.startsWith("172.")&&g.split(".")[1]>="16"&&g.split(".")[1]<="31"||g.startsWith("[::ffff:7f00:1]:")?t:t+"s"),A=`${E}://${g}/${h?`parties/${h}`:"party"}/${d}${w}`,D=(x={})=>`${A}?${new URLSearchParams([...Object.entries(s),...Object.entries(x).filter(lC)])}`,k=typeof m=="function"?async()=>D(await m()):D(m);return{host:g,path:w,room:d,name:v,protocol:E,partyUrl:A,urlProvider:k}}var cC=class extends aC{constructor(t){const s=Im(t);super(s.urlProvider,s.protocols,s.socketOptions);Le(this,"_pk");Le(this,"_pkurl");Le(this,"name");Le(this,"room");Le(this,"host");Le(this,"path");this.partySocketOptions=t,this.setWSProperties(s)}updateProperties(t){const s=Im({...t,host:t.host??this.host,room:t.room??this.room,path:t.path??this.path});this._url=s.urlProvider,this._protocols=s.protocols,this._options=s.socketOptions,this.setWSProperties(s)}setWSProperties(t){const{_pk:s,_pkurl:i,name:a,room:u,host:d,path:h}=t;this._pk=s,this._pkurl=i,this.name=a,this.room=u,this.host=d,this.path=h}reconnect(t,s){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(t,s)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(t,s){const i=ov(t,"http"),a=typeof i.urlProvider=="string"?i.urlProvider:await i.urlProvider();return(t.fetch??fetch)(a,s)}};function Im(n){const{id:t,host:s,path:i,party:a,room:u,protocol:d,query:h,protocols:m,...g}=n,v=t||uC(),w=ov(n,"ws",{_pk:v});return{_pk:v,_pkurl:w.partyUrl,name:w.name,room:w.room,host:w.host,path:w.path,protocols:m,socketOptions:g,urlProvider:w.urlProvider}}const dC=1e3,fC=3e3;class hC{constructor(t,s,i,a,u){var d;this.onClose=u,this.listeners=new Set,this.heartbeat=null,this.id=(d=a==null?void 0:a.id)!==null&&d!==void 0?d:crypto.randomUUID();const h=new cC({host:i.host,party:t,room:s,id:this.id,query:()=>{const v=i.getAuthToken();return{app_id:i.appId,handler:t,...v?{token:v}:{},...i.functionsVersion?{fv:i.functionsVersion}:{}}}});this.ws=h;let m=Date.now();const g=()=>{m=Date.now()};h.addEventListener("open",g),h.addEventListener("message",v=>{g();let w;try{w=JSON.parse(v.data)}catch{return}if((w&&typeof w=="object"?w.type:void 0)!=="__pong")for(const A of this.listeners)A(w)}),this.heartbeat=setInterval(()=>{if(Date.now()-m>fC){g(),h.reconnect();return}try{h.send(JSON.stringify({type:"__ping"}))}catch{}},dC)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.ws.send(JSON.stringify(t))}close(){this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose()}}function pC(n,t,s,i){let a=null;return{connect(u){if(a)return a;const d=new hC(n,t,s,u,()=>{i.delete(d),a===d&&(a=null)});return a=d,i.add(d),d}}}function mC(n,t){return n&&!n.startsWith("/")?n:t??n}function gC(n){const t=new Set;return{module:new Proxy({},{get(i,a){if(!(typeof a!="string"||a==="then"))return u=>pC(a,u,n,t)}}),closeAll:()=>{for(const i of[...t])i.close()}}}function yC(n){var t,s,i;const{serverUrl:a="https://base44.app",appId:u,token:d,serviceToken:h,requiresAuth:m=!1,appBaseUrl:g,options:v,functionsVersion:w,headers:E}=n,A=typeof g=="string"?g:"",D={serverUrl:a,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:u,token:d};let k=null;const x=()=>(k||(k=nC({config:D})),k),S={...E,"X-App-Id":String(u)},L=w?{...S,"Base44-Functions-Version":w}:S,O=Di({baseURL:`${a}/api`,headers:S,token:d,onError:v==null?void 0:v.onError}),j=Di({baseURL:`${a}/api`,headers:L,token:d,interceptResponses:!1,onError:v==null?void 0:v.onError}),V={...S,...d?{"on-behalf-of":`Bearer ${d}`}:{}},$=Di({baseURL:`${a}/api`,headers:V,token:h,onError:v==null?void 0:v.onError}),G=Di({baseURL:`${a}/api`,headers:L,token:h,interceptResponses:!1}),B=nk(O,j,u,{appBaseUrl:A});if(typeof window<"u"){const xe=d||Yr();xe&&B.setToken(xe)}const oe=gC({appId:u,host:mC(a,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:w,getAuthToken:()=>d||Yr()}),ue={entities:_m({axios:O,appId:u,getSocket:x}),integrations:Em(O,u),connectors:ik(O,u),auth:B,functions:km(j,u,{getAuthHeaders:()=>{const xe={},J=d||Yr();return J&&(xe.Authorization=`Bearer ${J}`),xe},baseURL:(s=j.defaults)===null||s===void 0?void 0:s.baseURL}),agents:Cm({axios:O,getSocket:x,appId:u,serverUrl:a,token:d}),aiGateway:Rm({serverUrl:a,token:d,appId:u}),appLogs:Tm(O,u),users:ak(O,u),analytics:$E({axiosClient:O,serverUrl:a,appId:u,userAuthModule:B}),actors:oe.module,cleanup:()=>{ue.analytics.cleanup(),oe.closeAll(),k&&k.disconnect()}},be={entities:_m({axios:$,appId:u,getSocket:x}),integrations:Em($,u),sso:rk($,u),connectors:sk($,u),functions:km(G,u,{getAuthHeaders:()=>{const xe={};return h&&(xe.Authorization=`Bearer ${h}`),xe},baseURL:(i=G.defaults)===null||i===void 0?void 0:i.baseURL}),agents:Cm({axios:$,getSocket:x,appId:u,serverUrl:a,token:d}),aiGateway:Rm({serverUrl:a,token:h,appId:u}),appLogs:Tm($,u),cleanup:()=>{k&&k.disconnect()}};return m&&typeof window<"u"&&setTimeout(async()=>{try{await ue.auth.isAuthenticated()||ue.auth.redirectToLogin(window.location.href)}catch(xe){console.error("Authentication check failed:",xe),ue.auth.redirectToLogin(window.location.href)}},0),{...ue,setToken(xe){ue.auth.setToken(xe),k&&k.updateConfig({token:xe}),D.token=xe},getConfig(){return{serverUrl:a,appId:u,requiresAuth:m}},get asServiceRole(){if(!h)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return be}}}const av=typeof window>"u",vC=av?{localStorage:new Map}:window,$i=vC.localStorage,wC=n=>n.replace(/([A-Z])/g,"_$1").toLowerCase(),Ts=(n,{defaultValue:t=void 0,removeFromUrl:s=!1}={})=>{if(av)return t;const i=`base44_${wC(n)}`,a=new URLSearchParams(window.location.search),u=a.get(n);if(s){a.delete(n);const h=`${window.location.pathname}${a.toString()?`?${a.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,h)}if(u)return $i.setItem(i,u),u;if(t)return $i.setItem(i,t),t;const d=$i.getItem(i);return d||null},xC=()=>(Ts("clear_access_token")==="true"&&($i.removeItem("base44_access_token"),$i.removeItem("token")),{appId:Ts("app_id",{defaultValue:"6a7a83aa830c499b08ece09e"}),token:Ts("access_token",{removeFromUrl:!0}),fromUrl:Ts("from_url",{defaultValue:window.location.href}),functionsVersion:Ts("functions_version",{defaultValue:"prod"}),appBaseUrl:Ts("app_base_url",{defaultValue:void 0})}),Fi={...xC()},{appId:bC,token:SC,functionsVersion:_C,appBaseUrl:EC}=Fi,Ui=yC({appId:bC,token:SC,functionsVersion:_C,serverUrl:"",requiresAuth:!1,appBaseUrl:EC});function kC({}){var a;const t=id().pathname.substring(1),{data:s,isFetched:i}=Ub({queryKey:["user"],queryFn:async()=>{try{return{user:await Ui.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return p.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:p.jsx("div",{className:"max-w-md w-full",children:p.jsxs("div",{className:"text-center space-y-6",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),p.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),p.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",p.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),i&&s.isAuthenticated&&((a=s.user)==null?void 0:a.role)==="admin"&&p.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:p.jsxs("div",{className:"flex items-start space-x-3",children:[p.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:p.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),p.jsxs("div",{className:"text-left space-y-1",children:[p.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),p.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),p.jsx("div",{className:"pt-6",children:p.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[p.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const lv=_.createContext(),CC=({children:n})=>{const[t,s]=_.useState(null),[i,a]=_.useState(!1),[u,d]=_.useState(!0),[h,m]=_.useState(!0),[g,v]=_.useState(null),[w,E]=_.useState(!1),[A,D]=_.useState(null);_.useEffect(()=>{k()},[]);const k=async()=>{var O,j;try{m(!0),v(null);const V=Di({baseURL:"/api/apps/public",headers:{"X-App-Id":Fi.appId},token:Fi.token,interceptResponses:!0});try{const $=await V.get(`/prod/public-settings/by-id/${Fi.appId}`);D($),Fi.token?await x():(d(!1),a(!1),E(!0)),m(!1)}catch($){if(console.error("App state check failed:",$),$.status===403&&((j=(O=$.data)==null?void 0:O.extra_data)!=null&&j.reason)){const G=$.data.extra_data.reason;v(G==="auth_required"?{type:"auth_required",message:"Authentication required"}:G==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:G,message:$.message})}else v({type:"unknown",message:$.message||"Failed to load app"});m(!1),d(!1)}}catch(V){console.error("Unexpected error:",V),v({type:"unknown",message:V.message||"An unexpected error occurred"}),m(!1),d(!1)}},x=async()=>{try{d(!0);const O=await Ui.auth.me();s(O),a(!0),d(!1),E(!0)}catch(O){console.error("User auth check failed:",O),d(!1),a(!1),E(!0),(O.status===401||O.status===403)&&v({type:"auth_required",message:"Authentication required"})}},S=(O=!0)=>{s(null),a(!1),O?Ui.auth.logout(window.location.href):Ui.auth.logout()},L=()=>{Ui.auth.redirectToLogin(window.location.href)};return p.jsx(lv.Provider,{value:{user:t,isAuthenticated:i,isLoadingAuth:u,isLoadingPublicSettings:h,authError:g,appPublicSettings:A,authChecked:w,logout:S,navigateToLogin:L,checkUserAuth:x,checkAppState:k},children:n})},RC=()=>{const n=_.useContext(lv);if(!n)throw new Error("useAuth must be used within an AuthProvider");return n},TC=()=>p.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:p.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:p.jsxs("div",{className:"text-center",children:[p.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:p.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),p.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),p.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),p.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[p.jsx("p",{children:"If you believe this is an error, you can:"}),p.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[p.jsx("li",{children:"Verify you are logged in with the correct account"}),p.jsx("li",{children:"Contact the app administrator for access"}),p.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),NC=n=>{const t=n.slice(1);try{return decodeURIComponent(t)}catch{return t}};function PC(){const{pathname:n,hash:t}=id(),s=fS();return _.useEffect(()=>{if(s!=="POP"){if(t){const i=NC(t),a=window.setTimeout(()=>{var u;(u=document.getElementById(i))==null||u.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(a)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[n,t,s]),null}function OC(){const[n,t]=_.useState(!1),[s]=_.useState({value:"12.84",change:"+0.42",up:!0});return _.useEffect(()=>{let i=window.scrollY;const a=()=>{const u=window.scrollY;t(u>200&&u>i),i=u};return window.addEventListener("scroll",a,{passive:!0}),()=>window.removeEventListener("scroll",a)},[]),p.jsx("div",{className:"fixed top-0 inset-x-0 z-[1000] h-10 bg-alrazah-navy text-alrazah-warm-white border-b border-alrazah-gold/20 transition-transform duration-300",style:{transform:n?"translateY(-100%)":"translateY(0)"},children:p.jsxs("div",{className:"alrazah-container flex items-center justify-between h-full text-[12px] tracking-wide",children:[p.jsx("span",{className:"hidden sm:inline text-alrazah-warm-white/80",children:"Alrazah Holding (Q.S.C.) is listed on the Qatar Stock Exchange (Ticker: ALRAZAH)"}),p.jsxs("div",{className:"flex items-center gap-5 ml-auto",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-alrazah-gold font-mono",children:"ALRAZAH"}),p.jsxs("span",{className:"font-mono text-alrazah-warm-white",children:[s.value," QAR"]}),p.jsx("span",{className:`font-mono ${s.up?"text-alrazah-success":"text-alrazah-error"}`,children:s.change})]}),p.jsxs("button",{className:"flex items-center gap-1.5 text-alrazah-gold hover:text-alrazah-warm-white transition-colors",children:[p.jsx("span",{className:"font-medium",children:"EN"}),p.jsx("span",{className:"text-alrazah-warm-white/40",children:"/"}),p.jsx("span",{className:"text-alrazah-warm-white/60",children:"عربي"})]})]})]})})}function xt(n={}){const t=_.useRef(null),[s,i]=_.useState(!1);return _.useEffect(()=>{const a=t.current;if(!a)return;const u=new IntersectionObserver(([d])=>{d.isIntersecting&&(i(!0),u.unobserve(d.target))},{threshold:n.threshold??.15,rootMargin:n.rootMargin??"0px 0px -10% 0px"});return u.observe(a),()=>u.disconnect()},[n.threshold,n.rootMargin]),{ref:t,visible:s}}function AC(n,t=1500,s=!1){const[i,a]=_.useState(0);return _.useEffect(()=>{if(!s)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){a(n);return}let d;const h=performance.now(),m=g=>{const v=g-h,w=Math.min(v/t,1),E=w===1?1:1-Math.pow(2,-10*w);a(n*E),w<1&&(d=requestAnimationFrame(m))};return d=requestAnimationFrame(m),()=>cancelAnimationFrame(d)},[n,t,s]),i}function jC(n=100){const[t,s]=_.useState(!1);return _.useEffect(()=>{const i=()=>s(window.scrollY>n);return i(),window.addEventListener("scroll",i,{passive:!0}),()=>window.removeEventListener("scroll",i)},[n]),t}const Dm=[{label:"About Us",href:"#"},{label:"Our Business",href:"#",mega:!0},{label:"Investor Relations",href:"#"},{label:"Sustainability",href:"#"},{label:"Media Centre",href:"#"},{label:"Careers",href:"#"}],LC=[{title:"Real Estate",items:["Residential","Commercial","Retail","Hospitality"]},{title:"Logistics & Industrial",items:["Distribution Centers","Warehousing","Cold Chain","Heavy Industrial"],active:"Distribution Centers"},{title:"Asset Management",items:["Investment Funds","Portfolio Management","Advisory"]}];function zC(){const n=jC(100),[t,s]=_.useState(!1),[i,a]=_.useState(!1);return p.jsxs("header",{className:`fixed inset-x-0 top-10 z-[999] transition-all duration-300 ${n?"bg-alrazah-charcoal/95 backdrop-blur-md shadow-[0_2px_16px_rgba(10,22,40,0.12)]":"bg-transparent"}`,children:[p.jsxs("nav",{className:"alrazah-container flex items-center justify-between h-16 lg:h-20",children:[p.jsx("a",{href:"/",className:"flex items-center gap-2 shrink-0 group",children:p.jsxs("div",{className:"flex flex-col leading-none",children:[p.jsx("span",{className:"font-display text-xl lg:text-2xl text-alrazah-warm-white tracking-tight",children:"ALRAZAH"}),p.jsx("span",{className:"text-[9px] lg:text-[10px] tracking-[0.3em] text-alrazah-gold uppercase",children:"Holding Q.P.S.C."})]})}),p.jsx("ul",{className:"hidden lg:flex items-center gap-7",children:Dm.map(u=>p.jsxs("li",{className:"relative",onMouseEnter:()=>s(u.mega??!1),onMouseLeave:()=>s(!1),children:[p.jsxs("button",{className:"flex items-center gap-1 text-[14px] font-medium tracking-[0.04em] text-alrazah-warm-white hover:text-alrazah-gold transition-colors py-2",children:[u.label,u.mega&&p.jsx(jx,{className:"w-3.5 h-3.5"})]}),u.label==="Our Business"&&p.jsx("span",{className:`absolute -bottom-0.5 left-0 h-[2px] bg-alrazah-gold transition-transform duration-300 origin-left ${t?"w-6 scale-x-100":"w-6 scale-x-0"}`})]},u.label))}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("a",{href:"#",className:"hidden lg:inline-flex items-center text-[14px] font-semibold tracking-[0.06em] text-alrazah-gold border border-alrazah-gold px-6 py-3 hover:bg-alrazah-gold hover:text-alrazah-navy transition-all duration-250",children:"Investor Login"}),p.jsx("button",{className:"lg:hidden text-alrazah-gold p-2",onClick:()=>a(u=>!u),"aria-label":"Toggle menu",children:i?p.jsx(jg,{className:"w-6 h-6"}):p.jsx(qx,{className:"w-6 h-6"})})]})]}),t&&p.jsx("div",{className:"hidden lg:block absolute top-full inset-x-0 bg-alrazah-charcoal/95 backdrop-blur-lg border-t-2 border-alrazah-gold",onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:p.jsx("div",{className:"alrazah-container py-12 grid grid-cols-3 gap-10",children:LC.map(u=>p.jsxs("div",{children:[p.jsx("h4",{className:"text-[12px] font-semibold tracking-[0.08em] uppercase text-alrazah-gold mb-5",children:u.title}),p.jsx("ul",{className:"space-y-3",children:u.items.map(d=>{const h=u.active===d;return p.jsx("li",{children:p.jsx("a",{href:"#",className:`flex items-center gap-3 text-[15px] transition-colors ${h?"text-alrazah-gold border-l-[3px] border-alrazah-gold pl-3 -ml-3 font-medium":"text-alrazah-warm-white/80 hover:text-alrazah-gold"}`,children:d})},d)})})]},u.title))})}),i&&p.jsx("div",{className:"lg:hidden fixed inset-0 top-10 bg-alrazah-navy z-[998] overflow-y-auto",children:p.jsxs("div",{className:"px-5 py-8",children:[p.jsx("ul",{className:"space-y-1",children:Dm.map(u=>p.jsx("li",{children:p.jsx("a",{href:"#",className:"block py-4 text-lg text-alrazah-warm-white border-b border-alrazah-pearl/10",children:u.label})},u.label))}),p.jsx("a",{href:"#",className:"mt-8 inline-flex items-center text-alrazah-gold border border-alrazah-gold px-6 py-3 font-semibold",children:"Investor Login"})]})})]})}const Mm=[{label:"Home",href:"/"},{label:"Our Business",href:"#"},{label:"Logistics & Industrial",href:"#"},{label:"Distribution Centers",href:"#",current:!0}];function IC(){return p.jsx("div",{className:"bg-alrazah-navy pt-8 pb-6",children:p.jsx("div",{className:"alrazah-container",children:p.jsx("nav",{className:"flex items-center flex-wrap gap-1 text-[13px]","aria-label":"Breadcrumb",children:Mm.map((n,t)=>p.jsxs("span",{className:"flex items-center gap-2",children:[p.jsx("a",{href:n.href,className:`transition-colors ${n.current?"text-alrazah-warm-white font-medium":"text-alrazah-slate hover:text-alrazah-gold"}`,children:n.label}),t{const i=n.current;if(!i)return;const a=i.getBoundingClientRect();s({width:a.width,height:a.height});const u=new ResizeObserver(([d])=>{const{width:h,height:m}=d.contentRect;s({width:h,height:m})});return u.observe(i),()=>u.disconnect()},[n]),t}const MC={"media.base44.com":"/images/public/","static.wixstatic.com":"/media/"},FC=1024,Ln={OPTIMIZED:"optimized",ORIGINAL:"original",FALLBACK:"fallback"},UC=[1,2,3],BC=6e3;function $C(n){try{const t=new URL(n);if(t.protocol!=="https:"||t.username||t.password||t.port&&t.port!=="443")return null;const s=MC[t.hostname];if(!s)return null;const i=t.pathname.match(/^(.*)\/v1\/(?:fill|fit)\/[^/]+\/[^/]+$/i),a=i?i[1]:t.pathname,u=a.split("/").pop();return!a.startsWith(s)||!u||!/\.[a-z0-9]+$/i.test(u)||/\.svg$/i.test(u)?null:{baseUrl:`${t.origin}${a}`,filename:u}}catch{return null}}const Fm=n=>Math.min(Math.max(Math.round(n),1),BC),Um=n=>Math.min(1,Math.max(0,n));function Bc({baseUrl:n,filename:t},{width:s,height:i,crop:a,focalPoint:u,quality:d}){const h=[`w_${Fm(s)}`,`h_${Fm(i||s)}`];a&&h.push(u?`fp_${Um(u.x).toFixed(2)}_${Um(u.y).toFixed(2)}`:"al_c"),h.push(`q_${d}`,"usm_0.66_1.00_0.01","enc_webp","quality_auto");const m=/\.gif$/i.test(t)?t:t.replace(/\.[a-z0-9]+$/i,"")+".webp";return`${n}/v1/${a?"fill":"fit"}/${h.join(",")}/${m}`}function VC(n,t){return UC.map(s=>`${Bc(n,{...t,width:t.width*s,height:t.height?t.height*s:void 0})} ${s}x`).join(", ")}function HC(n,t){return(t==null?void 0:t.baseUrl)||n}function WC(n){return n===Ln.OPTIMIZED?Ln.ORIGINAL:Ln.FALLBACK}const ac="https://static.wixstatic.com/media/12d367_4f26ccd17f8f4e3a8958306ea08c2332~mv2.png",uv=_.forwardRef(({aspectRatio:n,className:t,style:s,children:i},a)=>p.jsx("span",{ref:a,className:br("inline-block relative",t),style:{aspectRatio:n,...s},children:i}));uv.displayName="ImageWrapper";const cv=_.forwardRef(({parsed:n,fittingType:t,focalPoint:s,quality:i,className:a,style:u,aspectRatio:d,onLoad:h,...m},g)=>{const v=_.useRef(null),w=_.useRef(null),E=DC(v),[A,D]=_.useState(!1);_.useImperativeHandle(g,()=>w.current),_.useEffect(()=>{D(!1)},[n.baseUrl]);const k=t!=="fit",x=E&&{width:E.width||FC,height:E.height?E.height:void 0,crop:k,focalPoint:k?s:void 0,quality:i};return p.jsxs(uv,{ref:v,aspectRatio:d,className:a,style:u,children:[x&&!A&&p.jsx("img",{src:Bc(n,{...x,width:20,height:x.height?Math.max(1,Math.round(20*x.height/x.width)):void 0,quality:20}),alt:"","aria-hidden":"true",className:"w-full h-full inset-0 absolute",style:{objectFit:t==="fit"?"contain":"cover",filter:"blur(10px)",transform:"scale(1.1)"}}),x&&p.jsx("img",{ref:w,src:Bc(n,x),srcSet:VC(n,x),loading:"lazy",className:br("w-full h-full inset-0 absolute",t==="fit"?"object-contain":"object-cover"),onLoad:S=>{D(!0),h==null||h(S)},...m})]})});cv.displayName="ResponsiveImage";const Ya=_.forwardRef(({src:n,fittingType:t="fill",originWidth:s,originHeight:i,focalPointX:a,focalPointY:u,quality:d=90,onError:h,...m},g)=>{const v=n&&n!==ac?$C(n):null,w=v?Ln.OPTIMIZED:Ln.ORIGINAL,[E,A]=_.useState({src:n,mode:w}),D=E.src===n?E.mode:w;_.useEffect(()=>{A({src:n,mode:w})},[n,w]);const x={...m,onError:j=>{if(D===Ln.FALLBACK)return;const V=WC(D);A({src:n,mode:V}),V===Ln.FALLBACK&&(h==null||h(j))}};if(!n)return p.jsx("img",{ref:g,src:ac,...x,"data-empty-image":!0});const S=D===Ln.OPTIMIZED?v:null;if(!S){const j=D===Ln.FALLBACK,V=j?ac:HC(n,v);return p.jsx("img",{ref:g,src:V,...x,"data-error-image":j||void 0})}const L=typeof a=="number"&&typeof u=="number"?{x:a,y:u}:void 0,O=s&&i?`${s} / ${i}`:void 0;return p.jsx(cv,{ref:g,parsed:S,fittingType:t,focalPoint:L,quality:d,aspectRatio:O,...x})});Ya.displayName="Image";const qC="https://media.base44.com/images/public/6a7a83aa830c499b08ece09e/aa577b696_generated_8858cdce.png",QC=[{label:"Total DC GLA",value:"280K",unit:"SQM"},{label:"Cross-Dock Ratio",value:"78",unit:"%"},{label:"Avg. Dock-to-Stock",value:"<4",unit:"hrs"},{label:"Last-Mile Coverage",value:"98",unit:"% Qatar"}];function KC(){const n=_.useRef(null),[t,s]=_.useState(!1);return _.useEffect(()=>{s(!0);const i=()=>{if(!n.current)return;const a=window.scrollY;a<800&&(n.current.style.transform=`translateY(${a*.5}px)`)};return window.addEventListener("scroll",i,{passive:!0}),()=>window.removeEventListener("scroll",i)},[]),p.jsxs("section",{className:"relative w-full min-h-[720px] max-h-[920px] h-[90vh] flex items-end overflow-hidden bg-alrazah-navy",style:{marginTop:"0"},children:[p.jsxs("div",{ref:n,className:"absolute inset-0 will-change-transform",children:[p.jsx(Ya,{src:qC,alt:"Distribution center in peak operation at night",className:"w-full h-full object-cover",fittingType:"fill"}),p.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(180deg, rgba(10,22,40,0.30) 0%, rgba(10,22,40,0.90) 100%)"}})]}),p.jsx("div",{className:"relative w-full",children:p.jsx("div",{className:"alrazah-container pb-20 lg:pb-24",children:p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_300px] gap-10 items-end",children:[p.jsxs("div",{className:"max-w-[900px]",children:[p.jsx("span",{className:"block text-[12px] tracking-[0.08em] uppercase text-alrazah-gold mb-4 transition-all duration-700",style:{opacity:t?1:0,transform:t?"translateY(0)":"translateY(20px)"},children:"Logistics & Industrial — Distribution Centers"}),p.jsx("h1",{className:"font-display font-light text-alrazah-warm-white text-[38px] leading-[1.05] tracking-[-0.02em] md:text-[52px] lg:text-[68px] transition-all duration-700 delay-[200ms]",style:{opacity:t?1:0,transform:t?"translateY(0)":"translateY(20px)"},children:"Velocity at Institutional Scale"}),p.jsx("p",{className:"mt-6 max-w-[720px] text-[18px] lg:text-[20px] leading-[1.6] text-alrazah-warm-white/90 transition-all duration-700 delay-[400ms]",style:{opacity:t?1:0,transform:t?"translateY(0)":"translateY(20px)"},children:"Alrazah Holding designs and operates distribution centers engineered for throughput — cross-dock, flow-through, and last-mile dispatch — positioned within 45 minutes of Qatar's entire consumption base. We do not store inventory. We accelerate it."}),p.jsxs("div",{className:"mt-10 flex flex-wrap items-center gap-4 transition-all duration-700 delay-[600ms]",style:{opacity:t?1:0,transform:t?"translateY(0)":"translateY(20px)"},children:[p.jsx("a",{href:"#facilities",className:"inline-flex items-center bg-alrazah-gold text-alrazah-navy font-semibold tracking-[0.06em] text-[14px] px-8 py-4 hover:bg-alrazah-deep-gold hover:-translate-y-0.5 hover:shadow-[0_4px_12px_rgba(197,160,89,0.3)] transition-all duration-250",children:"Explore Distribution Network"}),p.jsxs("a",{href:"#",className:"inline-flex items-center gap-2 border border-alrazah-warm-white text-alrazah-warm-white font-semibold tracking-[0.06em] text-[14px] px-8 py-4 hover:bg-alrazah-warm-white hover:text-alrazah-navy transition-all duration-250",children:[p.jsx(Xc,{className:"w-4 h-4"}),"Download Distribution Portfolio (PDF)"]}),p.jsxs("a",{href:"#",className:"inline-flex items-center gap-2 text-[13px] text-alrazah-gold hover:underline underline-offset-4 transition-all",children:["Schedule a Facility Tour ",p.jsx($a,{className:"w-4 h-4"})]})]})]}),p.jsxs("div",{className:"hidden lg:block bg-alrazah-navy-65 backdrop-blur-md border border-alrazah-pearl/20 p-7 transition-all duration-700 delay-[800ms]",style:{opacity:t?1:0,transform:t?"translateX(0)":"translateX(40px)"},children:[p.jsx("span",{className:"text-[12px] tracking-[0.08em] uppercase text-alrazah-gold",children:"Distribution Network"}),p.jsx("div",{className:"w-8 h-[2px] throughput-line my-3"}),p.jsx("dl",{className:"space-y-5",children:QC.map(i=>p.jsxs("div",{className:"flex items-baseline justify-between gap-4",children:[p.jsx("dt",{className:"text-[12px] text-alrazah-warm-white/70 max-w-[120px]",children:i.label}),p.jsxs("dd",{className:"text-right",children:[p.jsx("span",{className:"font-display font-light text-[32px] text-alrazah-gold leading-none",children:i.value}),p.jsx("span",{className:"ml-1 text-[12px] text-alrazah-warm-white/70",children:i.unit})]})]},i.label))})]})]})})}),p.jsxs("div",{className:"hidden lg:flex absolute bottom-8 right-20 flex-col items-center gap-2",children:[p.jsx("span",{className:"w-px bg-alrazah-gold/60 animate-scroll-pulse"}),p.jsx("span",{className:"text-[11px] tracking-[0.08em] uppercase text-alrazah-gold",children:"Scroll"})]})]})}const Bm=[{label:"Overview",href:"#overview"},{label:"Facilities",href:"#facilities"},{label:"Configurations",href:"#configurations"},{label:"Technology",href:"#technology"},{label:"Connectivity",href:"#connectivity"},{label:"Investor Data",href:"#investor"}];function GC(){const[n,t]=_.useState(!1),[s,i]=_.useState("overview");return _.useEffect(()=>{const a=()=>{t(window.scrollY>700);const u=Bm.map(d=>d.href.replace("#",""));for(const d of u){const h=document.getElementById(d);if(h){const m=h.getBoundingClientRect();if(m.top<=140&&m.bottom>=140){i(d);break}}}};return window.addEventListener("scroll",a,{passive:!0}),a(),()=>window.removeEventListener("scroll",a)},[]),p.jsx("div",{className:`sticky top-10 lg:top-[120px] z-[500] bg-alrazah-sand border-b border-alrazah-gold/15 transition-all duration-300 ${n?"shadow-[0_4px_16px_rgba(10,22,40,0.08)]":""}`,children:p.jsx("div",{className:"alrazah-container",style:{maskImage:"linear-gradient(90deg, transparent, black 6%, black 94%, transparent)"},children:p.jsx("ul",{className:"flex items-center gap-1 overflow-x-auto no-scrollbar py-0",children:Bm.map(a=>{const u=s===a.href.replace("#","");return p.jsx("li",{className:"shrink-0",children:p.jsxs("a",{href:a.href,className:`relative inline-block px-4 py-5 text-[13px] tracking-wide transition-colors ${u?"text-alrazah-gold font-semibold":"text-alrazah-charcoal hover:text-alrazah-gold"}`,children:[a.label,u&&p.jsx("span",{className:"absolute bottom-0 left-4 right-4 h-[2px] throughput-line"})]})},a.href)})})})})}const YC=[{label:"Cross-Dock Throughput",width:85,value:"1,200 pallets/day",opacity:1},{label:"Case Pick Rate",width:72,value:"8,400 cases/hour",opacity:.8},{label:"Truck Turnaround",width:65,value:"28 min avg",opacity:.6},{label:"Dock-to-Stock Time",width:45,value:"< 4 hours",opacity:.4}];function XC({bar:n,index:t,visible:s}){return p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsx("span",{className:"w-[140px] text-right text-[12px] tracking-[0.06em] uppercase text-alrazah-slate",children:n.label}),p.jsx("div",{className:"flex-1 h-3 bg-alrazah-slate/20 rounded-full overflow-hidden",children:p.jsx("div",{className:"h-full rounded-full throughput-line transition-all duration-1000 ease-out",style:{width:s?`${n.width}%`:"0%",transitionDelay:`${t*150}ms`,opacity:n.opacity}})}),p.jsx("span",{className:"font-mono text-[14px] text-alrazah-deep-gold min-w-[150px] text-right",children:n.value})]})}function JC(){const n=xt(),t=xt();return p.jsx("section",{id:"overview",className:"bg-alrazah-sand py-24 lg:py-24",children:p.jsx("div",{className:"alrazah-container",children:p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[52%_48%] gap-12 lg:gap-16",children:[p.jsxs("div",{ref:n.ref,className:`reveal ${n.visible?"is-visible":""}`,children:[p.jsx("span",{className:"text-[12px] tracking-[0.08em] uppercase text-alrazah-gold",children:"Strategic Overview"}),p.jsx("h2",{className:"mt-4 font-display text-alrazah-navy text-[32px] md:text-[48px] leading-[1.1] tracking-[-0.01em]",children:"Distribution as Economic Velocity"}),p.jsx("p",{className:"mt-8 max-w-[640px] text-[18px] lg:text-[20px] leading-[1.6] text-alrazah-charcoal",children:"A distribution center is not a warehouse. It is a velocity engine. While warehousing optimizes for storage density and long-term inventory holding, distribution centers optimize for throughput: the rapid intake, processing, and dispatch of goods to meet immediate demand. In Qatar's fast-growing retail and e-commerce markets, distribution velocity is the competitive advantage."}),p.jsx("p",{className:"mt-6 max-w-[640px] text-[15px] lg:text-[16px] leading-[1.7] text-alrazah-charcoal",children:"Alrazah Holding's distribution centers are configured for high-velocity operations: cross-dock layouts that minimize inventory dwell time, flow-through designs for FMCG and retail replenishment, and mezzanine-ready structures for e-commerce pick-and-pack. Every facility is positioned within 45 minutes of Qatar's primary consumption corridors — Doha, Lusail, Al Wakra, and Al Rayyan — ensuring that inventory is never far from the end consumer."}),p.jsxs("div",{className:"mt-12 flex items-start gap-6",children:[p.jsx("span",{className:"w-px h-16 throughput-line shrink-0"}),p.jsxs("div",{children:[p.jsx("p",{className:"font-display italic text-[20px] md:text-[24px] leading-[1.3] text-alrazah-navy",children:'"The best distribution center is one where goods spend less than 24 hours under our roof."'}),p.jsx("p",{className:"mt-3 text-[13px] text-alrazah-slate",children:"— Alrazah Holding Supply Chain Operations"})]})]})]}),p.jsx("div",{ref:t.ref,className:`reveal ${t.visible?"is-visible":""}`,children:p.jsxs("div",{className:"bg-alrazah-warm-white border border-alrazah-gold/15 p-8 rounded-lg shadow-[0_4px_24px_rgba(10,22,40,0.08)]",children:[p.jsx("h3",{className:"text-[12px] tracking-[0.06em] uppercase text-alrazah-navy font-semibold",children:"Operational Throughput Benchmarks"}),p.jsx("div",{className:"mt-8 space-y-6",children:YC.map((s,i)=>p.jsx(XC,{bar:s,index:i,visible:t.visible},s.label))}),p.jsx("p",{className:"mt-8 text-right text-[11px] tracking-[0.08em] uppercase text-alrazah-slate/70",children:"Source: Alrazah Holding Operations Data, Q2 2026"})]})})]})})})}const $m=[{name:"Alrazah Cross-Dock Hub, Doha",location:"Doha Industrial Area",status:"OPERATIONAL",config:"CROSS-DOCK",category:"Cross-Dock",img:"https://media.base44.com/images/public/6a7a83aa830c499b08ece09e/aa577b696_generated_8858cdce.png",description:"A 38,000 SQM high-velocity cross-dock facility with 20 loading bays, flow-through configuration, and sortation capacity of 8,400 cases per hour. Serves three major retail groups with daily replenishment cycles.",specs:[{label:"Total GLA",value:"38,000 SQM"},{label:"Loading Bays",value:"20"},{label:"Cross-Dock %",value:"85%"},{label:"Cases/Hour",value:"8,400"},{label:"Truck Turnaround",value:"26 min"},{label:"Mezzanine",value:"2,400 SQM"}],tenant:"Primary Use: Retail Replenishment / 3PL"},{name:"Al Wakra E-Commerce Fulfillment Center",location:"Al Wakra",status:"OPERATIONAL",config:"FULFILLMENT",category:"Fulfillment",img:"https://media.base44.com/images/public/6a7a83aa830c499b08ece09e/28c80b84b_generated_39609315.png",description:"A 24,000 SQM e-commerce fulfillment center with flow-through design, 14 loading bays, and a 3,600 SQM mezzanine pick module. Optimized for single-item picks and same-day dispatch across southern Doha catchments.",specs:[{label:"Total GLA",value:"24,000 SQM"},{label:"Loading Bays",value:"14"},{label:"Flow-Through",value:"100%"},{label:"Mezzanine",value:"3,600 SQM"},{label:"Pick Rate",value:"180 UPH"},{label:"Sortation",value:"6,000/hr"}],tenant:"Primary Use: E-commerce / 3PL"},{name:"Ras Abu Fontas FMCG Consolidation Hub",location:"Ras Abu Fontas",status:"OPERATIONAL",config:"CROSS-DOCK",category:"FMCG",img:"https://media.base44.com/images/public/6a7a83aa830c499b08ece09e/7780c6403_generated_6cbf92b9.png",description:"A 52,000 SQM port-adjacent FMCG consolidation hub with 28 loading bays and 72% cross-dock ratio. 12km from Hamad Port, customs-bonded. Throughput of 12,000 cases per hour serving national FMCG distribution.",specs:[{label:"Total GLA",value:"52,000 SQM"},{label:"Loading Bays",value:"28"},{label:"Cross-Dock %",value:"72%"},{label:"Cases/Hour",value:"12,000"},{label:"To Hamad Port",value:"12 km"},{label:"Customs",value:"Bonded"}],tenant:"Primary Use: FMCG Consolidation"},{name:"Lusail Last-Mile Dispatch Center",location:"Lusail",status:"UNDER CONSTRUCTION",config:"FULFILLMENT",category:"Fulfillment",img:"https://media.base44.com/images/public/6a7a83aa830c499b08ece09e/10b5478bf_generated_36e1fe11.png",description:"An 18,000 SQM last-mile dispatch center configured for parcel sortation and van-loaded dispatch. 10 high-frequency bays, delivery zone sortation, and driver welfare facilities. Delivery Q4 2026.",specs:[{label:"Total GLA",value:"18,000 SQM"},{label:"Loading Bays",value:"10"},{label:"Config",value:"Last-Mile"},{label:"Vans/Day",value:"120"},{label:"Coverage",value:"45 min"},{label:"Delivery",value:"Q4 2026"}],tenant:"Primary Use: Last-Mile Dispatch"}],ZC=["All","Cross-Dock","Fulfillment","Retail DC","FMCG"];function e2({f:n,index:t}){const{ref:s,visible:i}=xt();return p.jsx("article",{ref:s,className:"reveal group bg-alrazah-sand rounded-lg overflow-hidden border border-alrazah-gold/15 hover:border-alrazah-gold/40 hover:-translate-y-1 hover:shadow-[0_12px_48px_rgba(10,22,40,0.16)] transition-all duration-400",style:{transitionDelay:`${t*60}ms`},children:p.jsxs("div",{className:`${i?"is-visible":""}`,children:[p.jsxs("div",{className:"relative aspect-video overflow-hidden",children:[p.jsx(Ya,{src:n.img,alt:n.name,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-600",fittingType:"fill"}),p.jsxs("div",{className:"absolute top-4 left-4 flex gap-2",children:[p.jsx("span",{className:"bg-alrazah-navy/80 backdrop-blur-sm px-3 py-1.5 text-[11px] tracking-[0.08em] uppercase text-alrazah-warm-white",children:n.status}),p.jsx("span",{className:"bg-alrazah-gold/80 backdrop-blur-sm px-3 py-1.5 text-[11px] tracking-[0.08em] uppercase text-alrazah-navy",children:n.config})]})]}),p.jsxs("div",{className:"p-8 lg:p-10",children:[p.jsx("span",{className:"text-[11px] tracking-[0.08em] uppercase text-alrazah-gold",children:n.location}),p.jsx("h4",{className:"mt-2 font-display text-alrazah-navy text-[20px] lg:text-[24px] leading-[1.3]",children:n.name}),p.jsx("p",{className:"mt-3 text-[13px] leading-[1.6] text-alrazah-slate line-clamp-3",children:n.description}),p.jsx("div",{className:"mt-5 grid grid-cols-2 md:grid-cols-3 gap-3 border-t border-alrazah-gold/15 pt-5",children:n.specs.map(a=>p.jsxs("div",{children:[p.jsx("dt",{className:"text-[10px] tracking-[0.06em] uppercase text-alrazah-slate",children:a.label}),p.jsx("dd",{className:"font-mono text-[13px] text-alrazah-charcoal mt-0.5",children:a.value})]},a.label))}),p.jsx("p",{className:"mt-4 text-[13px] italic text-alrazah-slate",children:n.tenant}),p.jsxs("a",{href:"#",className:"mt-5 inline-flex items-center gap-1 text-[13px] text-alrazah-gold hover:underline underline-offset-4",children:["View Operational Profile ",p.jsx($a,{className:"w-3.5 h-3.5"})]})]})]})})}function t2(){const[n,t]=_.useState("All"),s=n==="All"?$m:$m.filter(i=>i.category===n);return p.jsx("section",{id:"facilities",className:"bg-alrazah-warm-white py-24",children:p.jsxs("div",{className:"alrazah-container",children:[p.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-end lg:justify-between gap-6 mb-12",children:[p.jsxs("div",{children:[p.jsx("span",{className:"text-[12px] tracking-[0.08em] uppercase text-alrazah-gold",children:"Facilities"}),p.jsx("h2",{className:"mt-4 font-display text-alrazah-navy text-[32px] md:text-[48px] leading-[1.1]",children:"High-Velocity Distribution Assets"}),p.jsx("p",{className:"mt-2 text-[16px] text-alrazah-slate max-w-[560px]",children:"Operational and development-ready distribution centers configured for cross-dock, fulfillment, and last-mile dispatch."})]}),p.jsx("div",{className:"flex flex-wrap gap-2",children:ZC.map(i=>p.jsx("button",{onClick:()=>t(i),className:`min-h-[44px] px-5 py-2 text-[13px] tracking-wide transition-all duration-200 ${n===i?"bg-alrazah-navy text-alrazah-warm-white":"border border-alrazah-slate/30 text-alrazah-slate hover:border-alrazah-gold hover:text-alrazah-gold"}`,children:i},i))})]}),p.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-10",children:s.map((i,a)=>p.jsx(e2,{f:i,index:a},i.name))}),p.jsx("div",{className:"mt-12 text-center",children:p.jsx("a",{href:"#",className:"inline-flex items-center border border-alrazah-gold text-alrazah-gold px-8 py-3.5 font-semibold text-[14px] tracking-[0.06em] hover:bg-alrazah-gold hover:text-alrazah-navy transition-all duration-250",children:"View All Distribution Assets"})})]})})}const n2=[{icon:$a,num:"01",title:"Cross-Dock",description:"Goods arrive inbound, are sorted and consolidated, and depart outbound with minimal or zero storage. Ideal for retail replenishment, LTL consolidation, and parcel hub operations. Floor plan optimizes dock door ratio and staging lane depth.",metric:"Avg. Dwell Time: < 8 hours | Cross-Dock Ratio: 80%+",layout:"Typical: 55% dock, 30% staging, 10% office, 5% storage"},{icon:s1,num:"02",title:"Flow-Through",description:"Continuous flow from receiving to shipping with intermediate value-add processing — labeling, kitting, repackaging. Ideal for FMCG, consumer electronics, and promotional assembly. U-shaped or straight-line flow configurations.",metric:"Throughput: 12,000 cases/day | Pick Accuracy: 99.6%",layout:"Typical: 40% receiving, 35% processing, 20% shipping, 5% office"},{icon:Mx,num:"03",title:"E-Commerce Fulfillment",description:"Multi-level pick modules with mezzanine structures, parcel sortation, and packing stations. Designed for single-item picks, batch picking, and same-day dispatch. Optimized for SKU proliferation and seasonal surge capacity.",metric:"Pick Rate: 180 UPH | Sortation: 6,000 parcels/hr",layout:"Typical: 30% ground pick, 35% mezzanine, 20% pack/sort, 15% dock"},{icon:Hx,num:"04",title:"Last-Mile Dispatch",description:"Small-format facilities positioned within dense urban catchments for van-loaded dispatch. Features high-frequency dock rotation, parcel sortation by delivery zone, and driver welfare facilities. Enables same-day and next-day delivery SLAs.",metric:"Vans/Day: 120 | Coverage: 45 min to 95% of Doha",layout:"Typical: 50% sortation, 30% dock, 10% van staging, 10% office"}];function r2({c:n,index:t}){const{ref:s,visible:i}=xt(),a=n.icon;return p.jsxs("article",{ref:s,className:`reveal ${i?"is-visible":""} bg-alrazah-warm-white/[0.05] border border-alrazah-pearl/15 p-8 lg:p-10 rounded-lg hover:bg-alrazah-warm-white/[0.08] hover:border-alrazah-gold/40 transition-all duration-300`,style:{transitionDelay:`${t*150}ms`},children:[p.jsx("span",{className:"font-display text-[48px] text-alrazah-gold/40 leading-none",children:n.num}),p.jsx(a,{className:"mt-4 w-12 h-12 text-alrazah-gold",strokeWidth:1.5}),p.jsx("h4",{className:"mt-4 font-display text-[20px] lg:text-[24px] text-alrazah-warm-white leading-[1.3]",children:n.title}),p.jsx("p",{className:"mt-3 text-[13px] leading-[1.6] text-alrazah-warm-white/75",children:n.description}),p.jsx("div",{className:"mt-6 w-6 h-[2px] throughput-line"}),p.jsx("p",{className:"mt-3 text-[11px] tracking-[0.06em] uppercase text-alrazah-gold",children:n.metric}),p.jsx("p",{className:"mt-2 text-[12px] text-alrazah-warm-white/60",children:n.layout})]})}function s2(){return p.jsx("section",{id:"configurations",className:"bg-alrazah-navy py-24",children:p.jsxs("div",{className:"alrazah-container",children:[p.jsxs("div",{className:"text-center max-w-[800px] mx-auto",children:[p.jsx("span",{className:"text-[12px] tracking-[0.08em] uppercase text-alrazah-gold",children:"Operational Configurations"}),p.jsx("h2",{className:"mt-4 font-display text-alrazah-warm-white text-[32px] md:text-[48px] leading-[1.1]",children:"Four Layouts. One Objective: Speed."}),p.jsx("p",{className:"mt-4 text-[18px] lg:text-[20px] leading-[1.6] text-alrazah-warm-white/85",children:"Our distribution centers are not one-size-fits-all. Each facility is configured to the specific throughput model of its tenant — cross-dock, flow-through, fulfillment, or last-mile."})]}),p.jsx("div",{className:"mt-16 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8",children:n2.map((n,t)=>p.jsx(r2,{c:n,index:t},n.num))}),p.jsx("div",{className:"mt-16 pt-8 border-t border-alrazah-pearl/20 max-w-[800px] mx-auto text-center",children:p.jsx("p",{className:"text-[18px] lg:text-[20px] leading-[1.6] text-alrazah-warm-white/90",children:"Each configuration is engineered to the tenant's specific SKU profile, order velocity, and service level agreement — ensuring that the building serves the operation, not the other way around."})})]})})}const i2=[{icon:Yx,title:"WMS Integration",body:"Pre-cabled infrastructure for SAP EWM, Manhattan Associates, Blue Yonder, and custom WMS deployments. Dedicated server room with UPS, cooling, and redundant fiber connectivity."},{icon:Kx,title:"Real-Time Visibility",body:"Wi-Fi 6 coverage throughout GLA, Bluetooth beacon positioning for asset tracking, and environmental sensors for temperature, humidity, and occupancy monitoring. API-ready for tenant dashboards."},{icon:Jx,title:"MHE Provisions",body:"Charging stations for electric forklifts and AMRs, conveyor mounting points, and mezzanine load capacity for future pick-to-light or shuttle system installation. Power and data infrastructure pre-installed."},{icon:$x,title:"Cyber-Physical Security",body:"Network segregation for operational technology (OT) and information technology (IT), CCTV with AI-powered analytics, and access control integration with tenant HR systems. ISO 27001-aligned data governance."}],o2=["Structured cabling: Category 6A throughout, 10Gbps capable","Power: Dedicated 50kVA UPS for server/communications rooms","Network: Dual-carrier fiber entry with automatic failover","Sensors: Pre-installed environmental and occupancy monitoring","API: Standardized data exchange protocols for WMS/TMS integration"];function a2(){const n=xt(),t=xt();return p.jsx("section",{id:"technology",className:"bg-alrazah-sand py-24",children:p.jsxs("div",{className:"alrazah-container",children:[p.jsxs("div",{children:[p.jsx("span",{className:"text-[12px] tracking-[0.08em] uppercase text-alrazah-gold",children:"Technology & Systems"}),p.jsx("h2",{className:"mt-4 font-display text-alrazah-navy text-[32px] md:text-[48px] leading-[1.1]",children:"Built for Intelligence. Ready for Automation."}),p.jsx("p",{className:"mt-3 max-w-[680px] text-[16px] leading-[1.7] text-alrazah-charcoal",children:"Our distribution centers are designed as technology platforms, with infrastructure pre-installed for WMS integration, IoT sensor networks, and future automation deployment."})]}),p.jsxs("div",{className:"mt-12 grid grid-cols-1 lg:grid-cols-2 gap-12",children:[p.jsx("div",{ref:n.ref,className:`reveal ${n.visible?"is-visible":""}`,children:p.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:i2.map((s,i)=>{const a=s.icon;return p.jsxs("div",{className:"bg-alrazah-warm-white border border-alrazah-gold/15 p-8 rounded-sm hover:border-alrazah-gold hover:-translate-y-0.5 transition-all duration-200",style:{transitionDelay:`${i*100}ms`},children:[p.jsx(a,{className:"w-6 h-6 text-alrazah-navy",strokeWidth:1.5}),p.jsx("h4",{className:"mt-4 font-display text-[20px] lg:text-[24px] text-alrazah-navy leading-[1.3]",children:s.title}),p.jsx("p",{className:"mt-3 text-[13px] leading-[1.6] text-alrazah-charcoal/80",children:s.body})]},s.title)})})}),p.jsxs("div",{ref:t.ref,className:`reveal ${t.visible?"is-visible":""} bg-alrazah-navy p-8 lg:p-12 rounded-lg flex flex-col`,children:[p.jsx("span",{className:"text-[12px] tracking-[0.08em] uppercase text-alrazah-gold",children:"Digital Infrastructure"}),p.jsx("h4",{className:"mt-4 font-display text-[24px] text-alrazah-warm-white leading-[1.3]",children:"The Building as a Platform"}),p.jsx("p",{className:"mt-4 text-[15px] leading-[1.7] text-alrazah-warm-white/85",children:"Alrazah distribution centers are constructed with technology infrastructure as a primary design input, not an afterthought. This approach reduces tenant fit-out time by 40% and eliminates the costly retrofit of power, data, and sensor networks into operational facilities."}),p.jsx("ul",{className:"mt-6 space-y-4 flex-1",children:o2.map(s=>p.jsxs("li",{className:"flex items-start gap-3",children:[p.jsx(Ox,{className:"w-4 h-4 text-alrazah-gold shrink-0 mt-0.5",strokeWidth:2}),p.jsx("span",{className:"text-[13px] leading-[1.6] text-alrazah-warm-white",children:s})]},s))}),p.jsxs("div",{className:"mt-6 pt-6 border-t border-alrazah-pearl/30",children:[p.jsx("p",{className:"text-[15px] italic text-alrazah-warm-white",children:"Average technology commissioning time: 5 days from handover."}),p.jsx("a",{href:"#",className:"mt-4 inline-flex items-center gap-1 text-[13px] text-alrazah-gold hover:underline underline-offset-4",children:"Request Technology Briefing →"})]})]})]})]})})}const l2=[{title:"Doha Industrial Area",subtitle:"National Hub",body:"2 distribution centers serving as Qatar's primary national distribution hub. Direct access to Doha Expressway and Orbital Highway. 15-minute coverage of central Doha, 30-minute coverage of West Bay and The Pearl.",metrics:"2 DCs | 90K SQM | 2.1M population coverage"},{title:"Al Wakra Logistics Corridor",subtitle:"Southern Catchment",body:"Southern distribution node serving Al Wakra, Mesaieed, and southern Doha catchments. Positioned on Orbital Highway with direct port access. Critical for FMCG and retail distribution to Qatar's fastest-growing residential corridor.",metrics:"1 DC | 38K SQM | 680K population coverage"},{title:"Lusail City",subtitle:"Northern Catchment",body:"Northern distribution node positioned to serve Lusail, Al Khor, and The Pearl. Direct Lusail Expressway access. Under construction for Q4 2026 delivery, timed to coincide with Lusail's population inflection.",metrics:"1 DC | 18K SQM | 450K population coverage (projected)"},{title:"Ras Abu Fontas",subtitle:"Port-Adjacent",body:"Port-adjacent consolidation and cross-dock facility. 12km from Hamad Port. Primary inbound gateway for containerized imports before redistribution to Doha and southern nodes. Customs-bonded status.",metrics:"1 DC | 52K SQM | 12km to Hamad Port"}],Vm=[{name:"Doha",x:52,y:48,count:2},{name:"Al Wakra",x:50,y:62},{name:"Lusail",x:48,y:34},{name:"Ras Abu Fontas",x:44,y:58}];function u2({visible:n}){return p.jsxs("div",{className:"relative h-[300px] lg:h-[480px] bg-alrazah-sand border border-alrazah-gold/15 rounded-lg overflow-hidden",children:[p.jsxs("svg",{viewBox:"0 0 100 100",className:"absolute inset-0 w-full h-full",preserveAspectRatio:"xMidYMid slice",children:[p.jsx("path",{d:"M 30,20 Q 45,15 55,22 Q 68,28 65,45 Q 70,60 60,75 Q 50,82 42,72 Q 35,60 38,48 Q 32,35 30,20 Z",fill:"#FAFAF8",stroke:"rgba(107,114,128,0.4)",strokeWidth:"0.4"}),p.jsx("line",{x1:"35",y1:"35",x2:"60",y2:"55",stroke:"rgba(10,22,40,0.5)",strokeWidth:"0.5"}),p.jsx("line",{x1:"48",y1:"30",x2:"52",y2:"65",stroke:"rgba(10,22,40,0.5)",strokeWidth:"0.5"}),p.jsx("circle",{cx:"52",cy:"48",r:"18",fill:"rgba(197,160,89,0.15)"}),p.jsx("circle",{cx:"52",cy:"48",r:"11",fill:"rgba(197,160,89,0.2)"}),p.jsx("circle",{cx:"48",cy:"34",r:"9",fill:"rgba(197,160,89,0.1)"}),p.jsx("circle",{cx:"50",cy:"62",r:"9",fill:"rgba(197,160,89,0.1)"}),Vm.map((t,s)=>p.jsx("g",{children:[45,30,15].map((i,a)=>p.jsx("circle",{cx:t.x,cy:t.y,r:0,fill:"none",stroke:"rgba(197,160,89,0.6)",strokeWidth:"0.3",style:{animation:n?`pulse-ring 2.5s ease-out ${s*.3+a*.1}s infinite`:"none",transformOrigin:`${t.x}% ${t.y}%`},className:"origin-center"},i))},t.name))]}),Vm.map((t,s)=>p.jsx("div",{className:"absolute",style:{left:`${t.x}%`,top:`${t.y}%`,transform:"translate(-50%, -50%)",opacity:n?1:0,transition:`opacity 0.6s ease ${s*.2}s`},children:p.jsxs("div",{className:"relative",children:[p.jsx("span",{className:"block w-3 h-3 bg-alrazah-gold rotate-45 shadow-[0_0_0_2px_rgba(197,160,89,0.3)]"}),p.jsx("span",{className:"absolute inset-0 rounded-full border border-alrazah-gold/60 animate-pulse-ring",style:{width:16,height:16,left:-2,top:-2}}),p.jsx("span",{className:"absolute inset-0 rounded-full border border-alrazah-gold/40 animate-pulse-ring",style:{width:24,height:24,left:-6,top:-6,animationDelay:"0.5s"}}),p.jsx("span",{className:"absolute left-4 top-0 whitespace-nowrap text-[10px] tracking-[0.06em] uppercase text-alrazah-navy font-semibold bg-alrazah-warm-white/90 px-1.5 py-0.5 rounded-sm",children:t.name})]})},t.name)),p.jsxs("div",{className:"absolute bottom-3 left-3 bg-alrazah-warm-white/90 px-4 py-3 rounded-sm",children:[p.jsx("p",{className:"text-[10px] tracking-[0.08em] uppercase text-alrazah-navy font-semibold mb-2",children:"Coverage"}),p.jsxs("ul",{className:"space-y-1.5 text-[11px] text-alrazah-charcoal",children:[p.jsxs("li",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"w-3 h-3 rounded-full border border-alrazah-gold/60"})," 15 min"]}),p.jsxs("li",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"w-3 h-3 rounded-full border border-alrazah-gold/40"})," 30 min"]}),p.jsxs("li",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"w-3 h-3 bg-alrazah-gold rotate-45"})," DC Location"]})]})]})]})}function c2({c:n,index:t}){const{ref:s,visible:i}=xt();return p.jsxs("article",{ref:s,className:`reveal ${i?"is-visible":""} bg-alrazah-sand border border-alrazah-gold/15 p-6 rounded-sm hover:border-alrazah-gold hover:translate-x-1 transition-all duration-200`,style:{transitionDelay:`${t*100}ms`},children:[p.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[p.jsx("h4",{className:"font-display text-[20px] lg:text-[24px] text-alrazah-navy leading-[1.3]",children:n.title}),p.jsx("span",{className:"text-[10px] tracking-[0.08em] uppercase text-alrazah-gold whitespace-nowrap",children:n.subtitle})]}),p.jsx("p",{className:"mt-2 text-[13px] leading-[1.6] text-alrazah-charcoal/80",children:n.body}),p.jsx("p",{className:"mt-3 text-[11px] tracking-[0.06em] uppercase text-alrazah-slate",children:n.metrics})]})}function d2(){const n=xt();return p.jsx("section",{id:"connectivity",className:"bg-alrazah-warm-white py-24",children:p.jsxs("div",{className:"alrazah-container",children:[p.jsxs("div",{children:[p.jsx("span",{className:"text-[12px] tracking-[0.08em] uppercase text-alrazah-gold",children:"Connectivity"}),p.jsx("h2",{className:"mt-4 font-display text-alrazah-navy text-[32px] md:text-[48px] leading-[1.1]",children:"45 Minutes to 98% of Qatar"}),p.jsx("p",{className:"mt-3 max-w-[680px] text-[16px] leading-[1.7] text-alrazah-charcoal",children:"Our distribution centers are positioned at the optimal intersection of import corridors, highway networks, and dense population catchments to minimize lead times from dock to doorstep."})]}),p.jsxs("div",{className:"mt-12 grid grid-cols-1 lg:grid-cols-[55%_45%] gap-8 lg:gap-12",children:[p.jsx("div",{ref:n.ref,children:p.jsx(u2,{visible:n.visible})}),p.jsx("div",{className:"space-y-4",children:l2.map((t,s)=>p.jsx(c2,{c:t,index:s},t.title))})]})]})})}const f2=[{icon:u1,title:"Building Efficiency",body:"Rooftop solar PV provides up to 30% of facility energy. LED lighting with daylight harvesting and occupancy sensors reduces consumption by 60%. High-efficiency HVAC in office and welfare areas. Building management system (BMS) optimizes energy use in real time.",cta:"View Energy Performance Data →"},{icon:e1,title:"Fleet Electrification Ready",body:"All new distribution centers include EV charging infrastructure for tenant delivery fleets — 22kW AC and 150kW DC fast charging. Load management systems prevent grid overload during peak charging windows. Positioned to support Qatar's EV adoption targets.",cta:"EV Infrastructure Specifications →"},{icon:Nx,title:"Packaging & Waste Reduction",body:"Tenant facilities include cardboard baling and plastic film compaction equipment. Reverse logistics zones for packaging return and recycling. Designated areas for battery and electronic waste segregation in compliance with Ministry of Municipality guidelines.",cta:"Waste Management Policy →"}],h2=["30% Solar Coverage","60% ↓ Lighting Energy","EV-Ready: 100%"];function p2({c:n,index:t}){const{ref:s,visible:i}=xt(),a=n.icon;return p.jsxs("article",{ref:s,className:`reveal ${i?"is-visible":""} bg-alrazah-sand p-8 lg:p-10 rounded-lg`,style:{transitionDelay:`${t*150}ms`},children:[p.jsx(a,{className:"w-12 h-12 text-alrazah-gold",strokeWidth:1.5}),p.jsx("h4",{className:"mt-5 font-display text-[20px] lg:text-[24px] text-alrazah-navy leading-[1.3]",children:n.title}),p.jsx("p",{className:"mt-3 text-[14px] leading-[1.7] text-alrazah-charcoal/80",children:n.body}),p.jsx("a",{href:"#",className:"mt-5 inline-flex text-[13px] text-alrazah-gold hover:underline underline-offset-4",children:n.cta})]})}function m2(){const n=xt();return p.jsx("section",{className:"bg-alrazah-sand py-24",children:p.jsxs("div",{className:"alrazah-container",children:[p.jsxs("div",{className:"text-center max-w-[720px] mx-auto",children:[p.jsx("span",{className:"text-[12px] tracking-[0.08em] uppercase text-alrazah-gold",children:"Sustainability"}),p.jsx("h2",{className:"mt-4 font-display text-alrazah-navy text-[32px] md:text-[48px] leading-[1.1]",children:"Velocity Without Waste"}),p.jsx("p",{className:"mt-4 text-[18px] lg:text-[20px] leading-[1.6] text-alrazah-charcoal",children:"Our distribution centers integrate energy efficiency, electric vehicle readiness, and route optimization to reduce the carbon intensity of every case moved."})]}),p.jsx("div",{className:"mt-16 grid grid-cols-1 md:grid-cols-3 gap-8",children:f2.map((t,s)=>p.jsx(p2,{c:t,index:s},t.title))}),p.jsxs("div",{ref:n.ref,className:`reveal ${n.visible?"is-visible":""} mt-16 bg-alrazah-navy p-8 lg:p-12 border-l-4 border-alrazah-gold flex flex-col lg:flex-row items-center justify-between gap-8`,children:[p.jsx("h3",{className:"font-display text-[24px] lg:text-[32px] text-alrazah-warm-white leading-[1.2]",children:"Target: Net-Zero Distribution Operations by 2035"}),p.jsx("div",{className:"flex flex-col sm:flex-row items-center gap-6 lg:gap-8",children:h2.map((t,s)=>p.jsxs("div",{className:"flex items-center gap-6 lg:gap-8",children:[s>0&&p.jsx("span",{className:"hidden sm:block w-px h-12 bg-alrazah-pearl/30"}),p.jsx("span",{className:"font-display font-light text-[32px] lg:text-[40px] text-alrazah-gold leading-none",children:t})]},t))})]})]})})}const g2=[{value:980,prefix:"QAR ",suffix:"M",label:"Total Portfolio Value",change:"+16.4% YoY"},{value:280,prefix:"",suffix:"K SQM",label:"Total DC GLA",change:"+12.5% YoY"},{value:98,prefix:"",suffix:"%",label:"Occupancy Rate",change:"+2.1pp YoY"},{value:9.8,prefix:"",suffix:"%",label:"Gross Yield",change:"+0.6pp YoY"},{value:6.4,prefix:"",suffix:" years",label:"WALT",change:"+0.4 years YoY"}],y2=["Revenue: QAR 96M (+18% YoY)","NOI: QAR 82M (+15% YoY)","Net Asset Value: QAR 760M","Debt-to-Equity: 0.32x (conservative leverage)","Return on Cost: 19.2%","Tenant Retention: 97%"],lc=[{name:"3PL/Logistics",pct:35,color:"#C5A059"},{name:"Retail/FMCG",pct:30,color:"#E8DCC8"},{name:"E-commerce",pct:22,color:"#6B7280"},{name:"Manufacturing",pct:8,color:"#0A1628"},{name:"Other",pct:5,color:"#1E2A3A"}];function v2({m:n,visible:t,index:s}){const i=AC(n.value,1500,t),a=n.value>=100?Math.round(i):i.toFixed(1);return p.jsxs("div",{className:"text-center px-6 py-8 border-alrazah-pearl/20",style:{borderLeft:s===0?"none":"1px solid rgba(232,220,200,0.2)",transitionDelay:`${s*100}ms`},children:[p.jsxs("div",{className:"font-display font-light text-[40px] lg:text-[56px] text-alrazah-gold leading-none tracking-[-0.02em]",children:[n.prefix,a,n.suffix]}),p.jsx("p",{className:"mt-2 text-[12px] text-alrazah-warm-white/80",children:n.label}),p.jsx("p",{className:"mt-1 text-[11px] tracking-[0.06em] uppercase text-alrazah-success",children:n.change})]})}function w2(){const n=xt(),t=xt(),s=xt({threshold:.3});return p.jsx("section",{id:"investor",className:"bg-alrazah-navy py-24",children:p.jsxs("div",{className:"alrazah-container",children:[p.jsxs("div",{children:[p.jsx("span",{className:"text-[12px] tracking-[0.08em] uppercase text-alrazah-gold",children:"Investor Information"}),p.jsx("h2",{className:"mt-4 font-display text-alrazah-warm-white text-[32px] md:text-[48px] leading-[1.1]",children:"Distribution Division Performance"})]}),p.jsx("div",{ref:s.ref,className:"mt-12 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 border-t border-b border-alrazah-pearl/20",children:g2.map((i,a)=>p.jsx(v2,{m:i,visible:s.visible,index:a},i.label))}),p.jsxs("div",{className:"mt-16 grid grid-cols-1 lg:grid-cols-2 gap-8",children:[p.jsxs("div",{ref:n.ref,className:`reveal ${n.visible?"is-visible":""} bg-alrazah-warm-white/[0.05] p-8 lg:p-10 rounded-lg`,children:[p.jsx("h4",{className:"font-display text-[24px] text-alrazah-warm-white leading-[1.3]",children:"FY 2025 Distribution Division Highlights"}),p.jsx("ul",{className:"mt-6 space-y-4",children:y2.map(i=>p.jsxs("li",{className:"flex items-start gap-3",children:[p.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-alrazah-gold shrink-0 mt-2"}),p.jsx("span",{className:"text-[15px] leading-[1.6] text-alrazah-warm-white",children:i})]},i))}),p.jsxs("a",{href:"#",className:"mt-8 inline-flex items-center gap-2 border border-alrazah-gold text-alrazah-gold px-7 py-3.5 text-[14px] font-semibold tracking-[0.06em] hover:bg-alrazah-gold hover:text-alrazah-navy transition-all duration-250",children:[p.jsx(Xc,{className:"w-4 h-4"}),"Download FY2025 Distribution Supplement (PDF)"]})]}),p.jsxs("div",{ref:t.ref,className:`reveal ${t.visible?"is-visible":""} p-8 lg:p-10 rounded-lg bg-alrazah-warm-white/[0.03]`,children:[p.jsx("h4",{className:"font-display text-[24px] text-alrazah-warm-white leading-[1.3]",children:"Lease Diversification & Credit Quality"}),p.jsx("p",{className:"mt-4 text-[14px] leading-[1.7] text-alrazah-warm-white/85",children:"The distribution portfolio benefits from long-term leases to investment-grade tenants, with 85% of rental income derived from multinational 3PLs, listed retailers, and regional e-commerce platforms. The weighted average lease term of 6.4 years provides strong cash flow visibility in a supply-constrained market with growing demand for last-mile infrastructure."}),p.jsx("div",{className:"mt-6 h-6 w-full rounded-sm overflow-hidden flex",children:lc.map(i=>p.jsx("div",{className:"h-full transition-all duration-1000",style:{width:t.visible?`${i.pct}%`:"0%",backgroundColor:i.color,transitionDelay:`${lc.indexOf(i)*100}ms`},title:`${i.name}: ${i.pct}%`},i.name))}),p.jsx("div",{className:"mt-4 flex flex-wrap gap-x-4 gap-y-2",children:lc.map(i=>p.jsxs("span",{className:"flex items-center gap-2 text-[11px] tracking-[0.06em] uppercase text-alrazah-warm-white",children:[p.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:i.color}}),i.name," ",i.pct,"%"]},i.name))}),p.jsx("p",{className:"mt-6 text-[13px] italic leading-[1.6] text-alrazah-warm-white/70",children:"No single tenant exceeds 14% of total rental income. Average lease escalation: 3.5% annually, CPI-linked. 94% of leases include renewal options."})]})]})]})})}const x2=[{title:"Warehousing",subtitle:"Ambient Storage & Consolidation",img:"https://media.base44.com/images/public/6a7a83aa830c499b08ece09e/aa577b696_generated_8858cdce.png"},{title:"Cold Chain",subtitle:"Temperature-Controlled Logistics",img:"https://media.base44.com/images/public/6a7a83aa830c499b08ece09e/28c80b84b_generated_39609315.png"},{title:"Heavy Industrial",subtitle:"Yards, Open Storage & Heavy Fabrication",img:"https://media.base44.com/images/public/6a7a83aa830c499b08ece09e/7780c6403_generated_6cbf92b9.png"}];function b2({r:n,index:t}){const{ref:s,visible:i}=xt();return p.jsxs("article",{ref:s,className:`reveal ${i?"is-visible":""} group relative h-[400px] rounded-lg overflow-hidden cursor-pointer`,style:{transitionDelay:`${t*100}ms`},children:[p.jsx(Ya,{src:n.img,alt:n.title,className:"absolute inset-0 w-full h-full object-cover group-hover:scale-105 transition-transform duration-600",fittingType:"fill"}),p.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(0deg, rgba(10,22,40,0.94) 0%, rgba(10,22,40,0.50) 55%, rgba(10,22,40,0.08) 100%)"}}),p.jsxs("div",{className:"absolute bottom-0 inset-x-0 p-8",children:[p.jsx("span",{className:"text-[12px] tracking-[0.08em] uppercase text-alrazah-gold",children:n.title}),p.jsx("h4",{className:"mt-2 font-display text-[24px] text-alrazah-warm-white leading-[1.3]",children:n.subtitle}),p.jsx("span",{className:"mt-3 inline-flex text-[13px] text-alrazah-gold",children:"Explore →"})]})]})}function S2(){const n=xt(),t=xt();return p.jsxs(p.Fragment,{children:[p.jsx("section",{className:"bg-alrazah-gold py-20",children:p.jsx("div",{ref:n.ref,className:`alrazah-container ${n.visible?"is-visible":""} reveal`,children:p.jsxs("div",{className:"text-center max-w-[840px] mx-auto",children:[p.jsx("h2",{className:"font-display text-alrazah-navy text-[32px] md:text-[48px] leading-[1.1]",children:"Accelerate Your Operations. Or Your Capital."}),p.jsx("p",{className:"mt-4 text-[18px] lg:text-[20px] leading-[1.6] text-alrazah-navy/85",children:"Whether you are a retailer, e-commerce operator, or 3PL seeking high-velocity distribution infrastructure in Qatar, or an institutional investor seeking exposure to GCC logistics real estate, Alrazah Holding invites you to engage."}),p.jsxs("div",{className:"mt-10 flex flex-wrap items-center justify-center gap-4",children:[p.jsx("a",{href:"#",className:"bg-alrazah-navy text-alrazah-warm-white px-8 py-4 font-semibold text-[14px] tracking-[0.06em] hover:bg-alrazah-charcoal hover:-translate-y-0.5 hover:shadow-[0_8px_24px_rgba(10,22,40,0.2)] transition-all duration-250",children:"Enquire About Tenancy"}),p.jsx("a",{href:"#",className:"border border-alrazah-navy text-alrazah-navy px-8 py-4 font-semibold text-[14px] tracking-[0.06em] hover:bg-alrazah-navy hover:text-alrazah-warm-white transition-all duration-250",children:"Contact Investor Relations"}),p.jsxs("a",{href:"#",className:"inline-flex items-center gap-2 text-[14px] text-alrazah-navy underline underline-offset-4",children:[p.jsx(Xc,{className:"w-4 h-4"}),"Download Corporate Profile (PDF)"]})]})]})})}),p.jsx("section",{className:"bg-alrazah-sand py-24",children:p.jsxs("div",{ref:t.ref,className:"alrazah-container",children:[p.jsxs("div",{children:[p.jsx("span",{className:"text-[12px] tracking-[0.08em] uppercase text-alrazah-gold",children:"Explore Logistics & Industrial"}),p.jsx("h2",{className:"mt-4 font-display text-alrazah-navy text-[32px] md:text-[48px] leading-[1.1]",children:"Related Capabilities"})]}),p.jsx("div",{className:"mt-12 grid grid-cols-1 md:grid-cols-3 gap-8",children:x2.map((s,i)=>p.jsx(b2,{r:s,index:i},s.title))})]})})]})}const _2=[{title:"Our Business",links:["Real Estate","Logistics & Industrial","Asset Management","Project Management"]},{title:"Investor Relations",links:["Financial Reports","Stock Information","Governance","AGM Materials","Contact IR"]}];function E2(){return p.jsx("footer",{className:"bg-alrazah-navy text-alrazah-warm-white pt-24 pb-12",children:p.jsxs("div",{className:"alrazah-container",children:[p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-12 lg:gap-10",children:[p.jsxs("div",{children:[p.jsxs("div",{className:"flex flex-col leading-none mb-4",children:[p.jsx("span",{className:"font-display text-2xl text-alrazah-warm-white",children:"ALRAZAH"}),p.jsx("span",{className:"text-[10px] tracking-[0.3em] text-alrazah-gold uppercase",children:"Holding Q.P.S.C."})]}),p.jsx("p",{className:"text-[14px] text-alrazah-slate leading-[1.6] mb-6",children:"A Qatari public shareholding company listed on the Qatar Stock Exchange. Building Qatar's future since 1998."}),p.jsx("div",{className:"flex items-center gap-3",children:[Ux,n1,a1].map((n,t)=>p.jsx("a",{href:"#",className:"w-9 h-9 rounded-full border border-alrazah-pearl/30 flex items-center justify-center text-alrazah-warm-white hover:bg-alrazah-gold hover:border-alrazah-gold hover:text-alrazah-navy transition-all duration-200","aria-label":"Social link",children:p.jsx(n,{className:"w-4 h-4"})},t))})]}),_2.map(n=>p.jsxs("div",{children:[p.jsx("h4",{className:"text-[12px] font-semibold tracking-[0.08em] uppercase text-alrazah-gold mb-5",children:n.title}),p.jsx("ul",{className:"space-y-3",children:n.links.map(t=>p.jsx("li",{children:p.jsx("a",{href:"#",className:"text-[14px] text-alrazah-warm-white/80 hover:text-alrazah-gold transition-all duration-200 hover:translate-x-1 inline-block",children:t})},t))})]},n.title)),p.jsxs("div",{children:[p.jsx("h4",{className:"text-[12px] font-semibold tracking-[0.08em] uppercase text-alrazah-gold mb-5",children:"Contact"}),p.jsxs("address",{className:"not-italic text-[14px] text-alrazah-warm-white/80 space-y-2 mb-5",children:[p.jsx("p",{children:"Alrazah Tower, West Bay"}),p.jsx("p",{children:"Doha, State of Qatar"}),p.jsx("p",{className:"pt-2",children:p.jsx("a",{href:"tel:+97400000000",className:"hover:text-alrazah-gold transition-colors",children:"+974 0000 0000"})}),p.jsx("p",{children:p.jsx("a",{href:"mailto:info@alrazahholding.qa",className:"hover:text-alrazah-gold transition-colors",children:"info@alrazahholding.qa"})})]}),p.jsxs("div",{className:"flex items-center border border-alrazah-pearl/30 rounded-sm overflow-hidden",children:[p.jsx("input",{type:"email",placeholder:"Investor email updates",className:"bg-transparent flex-1 px-4 py-3 text-[13px] text-alrazah-warm-white placeholder:text-alrazah-slate focus:outline-none"}),p.jsx("button",{className:"bg-alrazah-gold text-alrazah-navy px-4 py-3 hover:bg-alrazah-deep-gold transition-colors","aria-label":"Subscribe",children:p.jsx($a,{className:"w-4 h-4"})})]})]})]}),p.jsxs("div",{className:"mt-16 pt-6 border-t border-alrazah-pearl/10 flex flex-col md:flex-row items-center justify-between gap-4 text-[13px] text-alrazah-slate",children:[p.jsx("p",{children:"© 2026 Alrazah Holding Q.P.S.C. All rights reserved."}),p.jsx("div",{className:"flex items-center gap-5",children:["Privacy Policy","Terms of Use","Accessibility","Sitemap"].map(n=>p.jsx("a",{href:"#",className:"hover:text-alrazah-warm-white transition-colors",children:n},n))})]})]})})}function k2(){return _.useEffect(()=>{document.title="Distribution Centers | Alrazah Holding Q.P.S.C."},[]),p.jsxs("div",{className:"min-h-screen bg-alrazah-sand",children:[p.jsx(OC,{}),p.jsx(zC,{}),p.jsxs("main",{children:[p.jsx(KC,{}),p.jsx(IC,{}),p.jsx(GC,{}),p.jsx(JC,{}),p.jsx(t2,{}),p.jsx(s2,{}),p.jsx(a2,{}),p.jsx(d2,{}),p.jsx(m2,{}),p.jsx(w2,{}),p.jsx(S2,{})]}),p.jsx(E2,{})]})}const C2=()=>{const{isLoadingAuth:n,isLoadingPublicSettings:t,authError:s,navigateToLogin:i}=RC();if(t||n)return p.jsx("div",{className:"fixed inset-0 flex items-center justify-center bg-alrazah-navy",children:p.jsx("div",{className:"w-8 h-8 border-4 border-alrazah-gold/30 border-t-alrazah-gold rounded-full animate-spin"})});if(s){if(s.type==="user_not_registered")return p.jsx(TC,{});if(s.type==="auth_required")return i(),null}return p.jsxs(RS,{children:[p.jsx(Nc,{path:"/",element:p.jsx(k2,{})}),p.jsx(Nc,{path:"*",element:p.jsx(kC,{})})]})};function R2(){return p.jsx(CC,{children:p.jsxs(Tb,{client:Bb,children:[p.jsxs(PS,{children:[p.jsx(PC,{}),p.jsx(C2,{})]}),p.jsx(nb,{})]})})}vw.createRoot(document.getElementById("root")).render(p.jsx(R2,{}));